Fri, 15 Aug 2008 15:30:20 +0200, Gael Varoquaux wrote:
On Fri, Aug 15, 2008 at 02:59:43AM -0500, Stéfan van der Walt wrote:
- Expose a new interface to numpy, called numpy.api 2) If a certain
environment variable is set, the numpy namespace is not populated, and numpy.api becomes instantaneous to load.
That doesn't work because of a "feature" in Python's import: when loading foo.bar, Python loads foo.__init__ first. This is why we have "api" modules all over ETS.
I think you can still do something evil, like this:
import os if os.environ.get('NUMPY_VIA_API', '0') != '0': from numpy.lib.fromnumeric import * ...
But I'm not sure how many milliseconds must be gained to justify this...