[Numpy-discussion] Using 2-D arrays in Numeric Python (numpy)

Robert Kern robert.kern@gmail....
Sat Oct 11 00:46:53 CDT 2008

On Sat, Oct 11, 2008 at 00:38, Linda Seltzer
<lseltzer@alumni.caltech.edu> wrote:
> Thank you. It produced this error message:
> NameError: global name 'npy' is not defined

Note the line:

  import numpy as npy

>> In numpy it's
>>    import numpy as npy
>>    a = npy.zeros((256,256))
>>    a[0,0] = 1.0
>>    a[200,123] = -42.0
>>    # etc...
>> I think you were just missing the extra parentheses in the numpy
>> version of "zeros"
>> --bb

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