Reputation: 1651
How can i represent a 1x1x3 matrix in python.In matlab i have
fill_value(1,1,:) = [0; 0; 0];
I have converted this to python as
fill_value[0:1] = matrix(((0),(0),(0))).T
But it is not giving the expected result.
Upvotes: 3
Views: 559
Reputation: 249
you can write 1x1x3 matrix
using numpy.
import numpy
fill_value = numpy.array([[[0, 0, 0]]])
when we check
resol_val = fill_value.shape
output will be (1, 1, 3)
Upvotes: 2