I am starting to use VScode for developing Python, but I am having some trouble getting some things to works, most importantly I would like to be able to see definitions of functions. This should work by just hovering on the function (which does work for built-ins, like round()), but does not for imported modules, see the following screenshot: Defintion cant be loaded. For the module itself, I get information when hovering over its name: Description is shown.
It should be noted that I am using a Conda environment, which is noted in my settings.json:
"python.pythonPath": "/home/philip/miniconda3/envs/CV1/bin/python"
"Go to definition" on the function in question yields: "No defintion found for "arange"". The problem persists both in WSL and Windows 10, with different conda envs. Is there anything I need to put into my settings I am missing?
the method numpy.arange
is defined in a binary file numpy/core/multiarray
and its doc is generated in numpy/add_newdocs.py
(line ~1321).
It is a known function because it is defined in an __all__
list in numpy/core/numeric.py
Because there is no def arange()
Intellisense has no clue what the arguments are.
If you try with a different function defined in numpy/core/numeric.py
like ones
you get Intellisense on parameters.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.