NumPy · Method
ndarray.view
Creates a new NumPy array view over the same data. It can preserve the dtype, reinterpret the bytes with another dtype, or return an ndarray subclass.
Last updated
- Since
- 1.23.0
Syntax
ndarray.view([dtype][, type])In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
ndarray.copynumpy.reshapenumpy.ravelndarray.flattenndarray.transpose