[Numpy-discussion] Using 2-D arrays in Numeric Python (numpy)
Robert Kern
robert.kern at gmail.com
Sat Oct 11 01:46:53 EDT 2008
On Sat, Oct 11, 2008 at 00:38, Linda Seltzer
<lseltzer at 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