Reputation: 1308
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?
Upvotes: 0
Views: 140
Reputation: 1981
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] = ...
Upvotes: 2