[Numpy-discussion] "import numpy" is slow

Hanni Ali hanni.ali@gmail....
Tue Jul 1 05:44:55 CDT 2008


You are correct, it appears to take slightly longer to import numpy.core and
longer again to import numpy.core as numpy

I should obviously check first in future.

Hanni

2008/7/1 Matthieu Brucher <matthieu.brucher@gmail.com>:

> Hi,
>
> IIRC, il you do import numpy.core as numpy, it starts by importing
> numpy, so it will be even slower.
>
> Matthieu
>
> 2008/7/1 Hanni Ali <hanni.ali@gmail.com>:
> > Would it not be possible to import just the necessary module of numpy to
> > meet the necessary functionality of your application.
> >
> > i.e.
> >
> > import numpy.core
> >
> > or whatever you're using
> >
> > you could even do:
> >
> > import numpy.core as numpy
> >
> > I think, to simplify your code, I'm no expert though.
> >
> > Hanni
> >
> >
> > 2008/7/1 Andrew Dalke <dalke@dalkescientific.com>:
> >>
> >> On Jul 1, 2008, at 2:22 AM, Robert Kern wrote:
> >> > Your use case isn't so typical and so suffers on the import time
> >> > end of the
> >> > balance.
> >>
> >> I'm working on my presentation for EuroSciPy.  "Isn't so typical"
> >> seems to be a good summary of my first slide.  :)
> >>
> >> >> Any chance of cutting down on the number, in order
> >> >> to improve startup costs?
> >> >
> >> > Not at this point in time, no. That would break too much code.
> >>
> >> Understood.
> >>
> >> Thanks for the response,
> >>
> >>                                Andrew
> >>                                dalke@dalkescientific.com
> >>
> >>
> >> _______________________________________________
> >> Numpy-discussion mailing list
> >> Numpy-discussion@scipy.org
> >> http://projects.scipy.org/mailman/listinfo/numpy-discussion
> >
> >
> > _______________________________________________
> > Numpy-discussion mailing list
> > Numpy-discussion@scipy.org
> > http://projects.scipy.org/mailman/listinfo/numpy-discussion
> >
> >
>
>
>
> --
> French PhD student
> Website : http://matthieu-brucher.developpez.com/
> Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
> LinkedIn : http://www.linkedin.com/in/matthieubrucher
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080701/af475e0e/attachment.html 


More information about the Numpy-discussion mailing list