This is documentation for an old release of NumPy (version 1.14). Read this page in the documentation of the latest stable release (version 2.2).

numpy.ndarray.__array__

ndarray.__array__(|dtype) → reference if type unchanged, copy otherwise.

Returns either a new reference to self if dtype is not given or a new array of provided data type if dtype is different from the current dtype of the array.