Shouldn't numpy.core modules avoid calling numpy.lib ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Shouldn't numpy.core modules avoid calling numpy.lib ?

cdavid
Hi,

    I noticed that some functions in numpy.core call functions in
numpy.lib. Shouldn't this be avoided as much as possible, to avoid
potential circular import, dependencies, etc... ?

    cheers,

    David
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't numpy.core modules avoid calling numpy.lib ?

Charles R Harris


On Tue, May 20, 2008 at 8:14 PM, David Cournapeau <[hidden email]> wrote:
Hi,

   I noticed that some functions in numpy.core call functions in
numpy.lib. Shouldn't this be avoided as much as possible, to avoid
potential circular import, dependencies, etc... ?

Probably not. But numpy/lib looks like a basement closet to me, anyway. What functions are getting called?

Chuck


_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't numpy.core modules avoid calling numpy.lib ?

cdavid
Charles R Harris wrote:

>
>
> On Tue, May 20, 2008 at 8:14 PM, David Cournapeau
> <[hidden email] <mailto:[hidden email]>>
> wrote:
>
>     Hi,
>
>        I noticed that some functions in numpy.core call functions in
>     numpy.lib. Shouldn't this be avoided as much as possible, to avoid
>     potential circular import, dependencies, etc... ?
>
>
> Probably not.

Probably not avoided, or should probably not be called ?

> But numpy/lib looks like a basement closet to me, anyway. What
> functions are getting called?

I can see at least one: numpy.lib.issubtype in core/defmatrix.py, called
once. I am trying to see why importing numpy is slow, and those circular
import make the thing difficult to understand (or maybe I am just too
new to dtrace to understand how to use it effectively here).

cheers,

David
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't numpy.core modules avoid calling numpy.lib ?

Charles R Harris


On Tue, May 20, 2008 at 8:39 PM, David Cournapeau <[hidden email]> wrote:
Charles R Harris wrote:
>
>
> On Tue, May 20, 2008 at 8:14 PM, David Cournapeau
> <[hidden email] <mailto:[hidden email]>>
> wrote:
>
>     Hi,
>
>        I noticed that some functions in numpy.core call functions in
>     numpy.lib. Shouldn't this be avoided as much as possible, to avoid
>     potential circular import, dependencies, etc... ?
>
>
> Probably not.

Probably not avoided, or should probably not be called ?

Just that it looks cleaner to me if stuff in numpy/core doesn't call special libraries. I don't know that it is a problem. Maybe some utility functions should be moved into core?

Chuck



_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion