import numpy x = numpy.array([[1], [2], [3]])y = numpy.array([4, 5])i = ([1, 2], 0) print(x[i].shape)print(y.shape) x[i] = y print(repr(x))
Standard input is empty
(2,) (2,) array([[1], [4], [5]])
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!