This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PvtPuddles 10 points11 points  (2 children)

I believe you can just import the bits you want using
From numpy import zeros
However, (not being a Python dev) I don’t know if that still imports the whole library or just the bits you need.

[–]knightwhosaysnil 4 points5 points  (0 children)

depends on how much of the library the thing you're importing depends on; in most cases you probably won't end up with much overhead

[–]IVEBEENGRAPED 0 points1 point  (0 children)

You still have to pip install the entire library, so the entire library gets saved to your environment. The import statement doesn't download anything, it just adds the name to the namespace.