[Numpy-discussion] Need **working** code example of 2-D arrays

David Cournapeau cournape@gmail....
Sun Oct 12 03:11:04 CDT 2008


On Sun, Oct 12, 2008 at 3:39 PM, Linda Seltzer
<lseltzer@alumni.caltech.edu> wrote:

> These are the import statements I used:
> import numpy as npy
> from numpy.oldnumeric import *

Here is an example that works for any working numpy installation:

import numpy as npy
npy.zeros((256, 256)).

If those are the first two statements at python prompt, and it does
not work, your numpy installation is broken. In that case, which
platform and how did you install numpy would be useful information to
help you better.

> Please, no demeaning statements like "you forgot a parenthesis" or "you
> were using someone else's code" - just the lines of code for a file that
> actually *works.*

Those were not demeaning statements, and the line that works was shown
to you. I strongly suspect that either you did not give use enough
information, or that your numpy installation is broken.

cheers,

David


More information about the Numpy-discussion mailing list