[Tutor] inserting a vector into an array - numpy Q
ValueError: arrays must have same number of dimensions. What does this mean? The 1-d array that's being passed in has a different dimension than the 2d array.
ValueError: arrays must have same number of dimensions. What does this mean? The 1-d array that's being passed in has a different dimension than the 2d array.
If the above is intended to be Python code, it has problems. Rewrite it thusly?Then let a numpy expert finish the task. -- Bob Gailer 919-636-4239 Chapel Hill, NC.
Here is an example to demonstrate my problem (using numpy to avoid needing an image file, and to make it easier to show the results in text; you could instead use a 4x4 image and the .show() method of Image to see what I'm talking about)
My guess is that the hdf5 library loads the array as an mmap'ed memory block and you're not actually working with an ordinary numpy array (even if it has a similar interface). > I load a piece of the data file into memory as a numpy array.