With Numpy, I thought I could create a matrix this way
z = np.array( [np.linspace(0, 1, 2), np.ones((1, 2)), np.ones((1, 2))] )
which, however, gives me:
array([array([ 0., 1.]), array([[ 1., 1.]]), array([[ 1., 1.]])], dtype=object)
then checking its shape:
>>> z.shape
(3,)
The column dimension does not exist. So I think I got an array with three array objects.
How can I have the 3 x 2 matrix using linespace() and ones() here?
(2,)and(1,2)) that produced the 1d object array.