Guest User

Untitled

a guest
Jun 11th, 2018
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. `ndarray.reshape()` метод может убрать размерность:
  2.  
  3.     >>> import numpy
  4.     >>> a = numpy.array([[[1],[2]]])
  5.     >>> a.shape
  6.     (1, 2, 1)
  7.     >>> b = a.reshape(2)
  8.     >>> b
  9.     array([1, 2])
  10.     >>> b.shape
  11.     (2,)
Advertisement
Add Comment
Please, Sign In to add comment