2008/7/1 Hanni Ali <[EMAIL PROTECTED]>:
> Would it not be possible to import just the necessary module of  
> numpy to
> meet the necessary functionality of your application.

Matthieu Brucher responded:
> IIRC, il you do import numpy.core as numpy, it starts by importing
> numpy, so it will be even slower.

which you can see if you start python with the "-v" option to display  
imports.

 >>> import numpy.core
import numpy # directory /Library/Frameworks/Python.framework/ 
Versions/2.5/lib/python2.5/site-packages/numpy
# /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ 
site-packages/numpy/__init__.pyc matches /Library/Frameworks/ 
Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/ 
__init__.py
import numpy # precompiled from /Library/Frameworks/Python.framework/ 
Versions/2.5/lib/python2.5/site-packages/numpy/__init__.pyc
# /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ 
site-packages/numpy/__config__.pyc matches /Library/Frameworks/ 
Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/ 
__config__.py
import numpy.__config__ # precompiled from /Library/Frameworks/ 
Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/ 
__config__.pyc

   ...
and many more


                                Andrew
                                [EMAIL PROTECTED]


_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to