Vermillion - 10 months ago 79

Python Question

In Matlab, I have a 9x9 cell variable, where each cell element contains a column vector.

How can I implement this in Python, using numpy?

Answer Source

You can make a numpy array of python objects like this:

```
import numpy
a = numpy.empty((9,9),dtype='object')
a[0,0] = numpy.array([1,2,3,4])
a[0,1] = ...
```