No argument tooltip for some functions?
In Spyder, if I import numpy as np, then start typing:
np.arange(
I get a tooltip that tells me the arguments:
arange(start,stop,step,dtype=None)
In PyCharm, I get nothing.
I have tried with a few other functions, and the behaviour seems quite inconsistent. Any ideas why? Can this be fixed? Thanks!
Please sign in to leave a comment.
Hi,
You should get the tooltip as shown on the screenshot below (also notice the helpful documentation on the right):
The tooltip is triggered by opening brackets () . Which PyCharm version are you using?
I don't. That's odd. I get it for many other functions , including other numpy functions, but not arange.
Which numpy version are you using? In my case I'm using PyCharm 2018.3.5 and numpy==1.16.2 , do you have the issue with the same versions?
Numpy 1.16.2
PyCharm 2018.3.5 (Professional Edition)
Build #PY-183.5912.18, built on
Licensed to
You have a perpetual fallback license for this version
JRE: 1.8.0_152-release-1343-b28 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Hi John,
Strange, same versions as me. Let's try the following:
1. Try File > Invalidate caches / restart , that helps if there was an issue with caching / building skeletons
2. Type `np.arange()`, place caret inside the brackets, and press CTRL+P, that should force the tip to appear in case it's an interface related issue.
3. Hit CTRL+CLICK on "arange", that should take you to it's declaration, which should look something like this:
Do you have the same in your case?
No, it still doesn't work.
If I CTRL + click on arange, I am taken to multiarray.py, which does NOT contain def arange(....):
Maybe that's the issue?
Similarly, the documentation pane on the right shows numpy.core.multiarray , not arange.
I have done:
conda remove --force numpy
to remove numpy only, no ther packages. Then
conda install numpy
to reinstall it.
I have rebooted the PC, and done File -> invalidate caches / restart from PyCharm. Still nothing
>If I CTRL + click on arange, I am taken to multiarray.py, which does NOT contain def arange(....):
Yes, most likely that is the issue. Frankly, this method should not even work if PyCharm can't even find the declaration. Have you tried making a simple script with arange and running it? Also, try it from your system terminal using the same interpreter to confirm/exclude PyCharm from the suspect list.
Please also try to create a new environment and install numpy there. If still reproduced in new conda environment, try new virtualenv, as the issue might be conda-related.