I have a numpy ndarray of 3D coordinates in the following form..
array([[ 0., 0., 60.],
[ 0., 40., 60.],
[ 0., 40., 0.],
...,
[ 6., 0., 2.],
[ 4., 0., 2.],
[ 2., 0., 2.]])
I'm trying to reshape it so that rather than a 1D vector of coordinates I get a 2D grid of coordinates.
The original array is of length 1302 which should allow me to reshape into a 21x62 arrangement.
I tried coords_reshaped = np.ndarray.reshape(coords, (21,62)) but this spat out the error,
ValueError: total size of new array must be unchanged
So what am I missing here?
1row andncolumns. - Jossie Calderon2x3elements? - Jossie Calderon