Skip to content
masterclass Buddy

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.

Subscribe
  • ndarray.copy
  • numpy.reshape
  • numpy.ravel
  • ndarray.flatten
  • ndarray.transpose

Source: numpy.ndarray.view — NumPy v2.5 Manual. Checked 2026-11-03.