[AstroPy] Data Analysis and Programming in Python
I would recommend that you take a look at the 'Interactive Data Analysis' tutorial (pydatatut-2.pdf) in Chapter 1 for a much simpler discussion of numpy arrays and their available operations.
I would recommend that you take a look at the 'Interactive Data Analysis' tutorial (pydatatut-2.pdf) in Chapter 1 for a much simpler discussion of numpy arrays and their available operations.
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)
and returns > numpy object arrays, where the elements of the object arrays are > themselves 1d numpy arrays. I don't think there is any other way to do > it. In your example, the 'ragged' array would be a 1d numpy array with > dtype='O'...
Now, the problem is that what I've done is to create a Python array of *integers*, then converted it to numpy form. In your example code, you've created a Python array of hexadecimal-valued bytes -- which I guess is what you get reading in your "raw" image, so that's OK.