The python that can be executed normally in the interactive environment reports an error in IDE.

1. According to Google"s official machine learning course code, there is no problem when executing in an interactive environment, but an error will be reported when executed in vscode;

the 2.python code is as follows:

import numpy as np

np.random.permutation(10)

this code outputs the following result on the line of the interactive environment:

vscode:

do any code friends know what"s going on? Ask for advice!

The ide of

python recommends that you use pycharm or sublime text,
you may have this situation because the environment is not properly configured. Generally speaking, people who engage in python are less likely to use vscode as ide


recommend using pycharm to write python code


is most likely to be that your two python/numpy are not the same version.
print np.__version__ respectively. _ version__ > 1.10 should be OK.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e55e10-4ca72.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e55e10-4ca72.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?