numpy.ndarray.__array__#

method

ndarray.__array__([dtype, ]/, *, copy=None)#

For dtype parameter it 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 data type of the array. For copy parameter it returns a new reference to self if copy=False or copy=None and copying isn’t enforced by dtype parameter. The method returns a new array for copy=True, regardless of dtype parameter.