[Numpy-discussion] NumPy 1.2.0b2 released

Robert Kern robert.kern@gmail....
Fri Aug 15 03:24:15 CDT 2008

On Fri, Aug 15, 2008 at 02:59, Stéfan van der Walt <stefan@sun.ac.za> wrote:
> 2008/8/15 Robert Kern <robert.kern@gmail.com>:
>> The devil is in the details. What exactly do you propose? When we
>> discussed this last time, the participants more or less agreed that
>> environment variables could cause more fragility than they're worth.
>> It also breaks the first time you try to import a numpy-using library
>> that was not written with this in mind. Basically, you're stuck with
>> only code that you've written.
> First, I propose that I write some code.  Second, I do not suggest the
> behaviour above, but:
> 1) 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.
> Even if the user forgets to set the variable, everything works as
> planned.  If the user is aware of the variable, he won't be using
> numpy the normal way, so the fact that numpy.* is not available won't
> matter.

I'm afraid that I still don't understand. Please expand on the
following four cases (let's call the environment variable

1) NUMPY_FAST_IMPORT=0  (or simply absent)
   import numpy
   print dir(numpy)

   import numpy.api
   print dir(numpy.api)

   import numpy
   print dir(numpy)

   import numpy.api
   print dir(numpy.api)

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco

More information about the Numpy-discussion mailing list