mail.python.org
[MATRIX-SIG] NumPy arrays of python objects
The NumPy doc.html, and the Numeric Tutorial, both mention arrays of Python objects, but with little elaboration.
The NumPy doc.html, and the Numeric Tutorial, both mention arrays of Python objects, but with little elaboration.
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)
we should see several ways to do this. One way is with reshape: http://www.scipy.org/Numpy_Example_List_With_Doc#reshape.
If you download the software, you can build the doxygen documentation (follow the instructions) and you will find an example for each C++ class or function.and export it to Python and pass, from Python, a Numpy 2D array. Have a look at mds-utils and at its usage examples.