my_list = [1, 2, 3, 4]
d = numpy.ones((3, 4))
d
d[(0), :] = my_list
d[(1), :] = numpy.asarray(my_list)
d[(2), :] = numpy.asarray([my_list])
d
Efficient way to add a singleton dimension to a NumPy vector so that slice assignments work