简体   繁体   English

PyCharm自动导入NumPy为np

[英]PyCharm auto import NumPy as np

PyCharm has a neat option that allows when pressing ctrl+enter to automatically import libraries (eg os, sys, etc). PyCharm有一个简洁的选项,允许在按下ctrl+enter以自动导入库(例如os,sys等)。

It used to work for NumPy as well, that is when writing: 它曾用于NumPy,也就是写作时:

z = np.zeros(5)

it would give a suggestions to import numpy as np . 它会给出一个import numpy as np的建议。

However, after installing several packages this disappeared. 但是,安装好几个软件包之后就消失了。 Are these suggestions are defined anywhere? 这些建议是否在任何地方定义? Can I change/add to them? 我可以更改/添加它们吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM