ndarray.real

ndarray.real The real part of the array. See also numpy.real equivalent function Examples >>> x = np.sqrt([1+0j, 0+1j]) >>> x.real array([ 1. , 0.70710678]) >>> x.real.dtype dtype('float64')

ndarray.ravel()

ndarray.ravel([order]) Return a flattened array. Refer to numpy.ravel for full documentation. See also numpy.ravel equivalent function ndarray.flat a flat iterator on the array.

ndarray.put()

ndarray.put(indices, values, mode='raise') Set a.flat[n] = values[n] for all n in indices. Refer to numpy.put for full documentation. See also numpy.put equivalent function

ndarray.ptp()

ndarray.ptp(axis=None, out=None) Peak to peak (maximum - minimum) value along a given axis. Refer to numpy.ptp for full documentation. See also numpy.ptp equivalent function

ndarray.prod()

ndarray.prod(axis=None, dtype=None, out=None, keepdims=False) Return the product of the array elements over the given axis Refer to numpy.prod for full documentation. See also numpy.prod equivalent function

ndarray.partition()

ndarray.partition(kth, axis=-1, kind='introselect', order=None) Rearranges the elements in the array in such a way that value of the element in kth position is in the position it would be in a sorted array. All elements smaller than the kth element are moved before this element and all equal or greater are moved behind it. The ordering of the elements in the two partitions is undefined. New in version 1.8.0. Parameters: kth : int or sequence of ints Element index to partition by. The kt

ndarray.nonzero()

ndarray.nonzero() Return the indices of the elements that are non-zero. Refer to numpy.nonzero for full documentation. See also numpy.nonzero equivalent function

ndarray.newbyteorder()

ndarray.newbyteorder(new_order='S') Return the array with the same data viewed with a different byte order. Equivalent to: arr.view(arr.dtype.newbytorder(new_order)) Changes are also made in all fields and sub-arrays of the array data type. Parameters: new_order : string, optional Byte order to force; a value from the byte order specifications below. new_order codes can be any of: ?S? - swap dtype from current to opposite endian {?<?, ?L?} - little endian {?>?, ?B?} - big endian {?

ndarray.ndim

ndarray.ndim Number of array dimensions. Examples >>> x = np.array([1, 2, 3]) >>> x.ndim 1 >>> y = np.zeros((2, 3, 4)) >>> y.ndim 3

ndarray.nbytes

ndarray.nbytes Total bytes consumed by the elements of the array. Notes Does not include memory consumed by non-element attributes of the array object. Examples >>> x = np.zeros((3,5,2), dtype=np.complex128) >>> x.nbytes 480 >>> np.prod(x.shape) * x.itemsize 480