[Numpy-discussion] packaging scipy (was Re: Simple financial functions for NumPy)
Stéfan van der Walt
Mon Apr 7 15:16:57 CDT 2008
On 07/04/2008, Andreas Klöckner <firstname.lastname@example.org> wrote:
> On Montag 07 April 2008, Robert Kern wrote:
> > I would prefer not to do it at all. We've just gotten people moved
> > over from Numeric; I'd hate to break their trust again.
> IMO, numpy has arrived at a state where there's just enough namespace clutter
> to allow most use cases to get by without importing much sub-namespace junk,
> and I think that's a good place to be (and to stay).
I wouldn't exactly call 494 functions "just enough namespace clutter";
I'd much prefer to have a clean api to work with.
I certainly don't propose forcing such an api upon all users, but it
should be available as an option, at least. Tim's suggestion for a
separate package that pulls in a "structured" numpy would suit my
As Gael mentioned, __init__'s are cursed, otherwise we'd be able to
provide numpy.* for the flat earth society (all in friendly jest ;)
and numpy.api to expose a somewhat organised underlying structure. As
it is, importing numpy.api would trigger the __init__ of the flat
namespace as well; but I'd still be amenable to this solution since
the import doesn't take long, and the organisation of the api is more
important to me.
Would it therefore make sense to
a) Reorganise numpy to expose functionality as numpy.api.*
b) Do a series of imports in numpy.__init__ which pulls in from numpy.api.
This way, numpy.* would look exactly as it does now, bar the added member 'api'.
More information about the Numpy-discussion