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

Linda Seltzer lseltzer@alumni.caltech....
Sat Oct 11 00:38:54 CDT 2008


Thank you. It produced this error message:
NameError: global name 'npy' is not defined
> 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



More information about the Numpy-discussion mailing list