Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `ndarray.reshape()` метод может убрать размерность:
- >>> import numpy
- >>> a = numpy.array([[[1],[2]]])
- >>> a.shape
- (1, 2, 1)
- >>> b = a.reshape(2)
- >>> b
- array([1, 2])
- >>> b.shape
- (2,)
Advertisement
Add Comment
Please, Sign In to add comment