numpy.ndarray.__array__#
method
- ndarray.__array__([dtype, ]/, *, copy=None)#
For
dtype
parameter it returns either a new reference to self ifdtype
is not given or a new array of provided data type ifdtype
is different from the current data type of the array. Forcopy
parameter it returns a new reference to self ifcopy=False
orcopy=None
and copying isn’t enforced bydtype
parameter. The method returns a new array forcopy=True
, regardless ofdtype
parameter.