ndarray.tolist()

ndarray.tolist() Return the array as a (possibly nested) list. Return a copy of the array data as a (nested) Python list. Data items are converted to the nearest compatible Python type. Parameters: none Returns: y : list The possibly nested list of array elements. Notes The array may be recreated, a = np.array(a.tolist()). Examples >>> a = np.array([1, 2]) >>> a.tolist() [1, 2] >>> a = np.array([[1, 2], [3, 4]]) >>> list(a) [array([1, 2]), array([3,

ndarray.tofile()

ndarray.tofile(fid, sep="", format="%s") Write array to a file as text or binary (default). Data is always written in ?C? order, independent of the order of a. The data produced by this method can be recovered using the function fromfile(). Parameters: fid : file or str An open file object, or a string containing a filename. sep : str Separator between array items for text output. If ?? (empty), a binary file is written, equivalent to file.write(a.tobytes()). format : str Format strin

ndarray.tobytes()

ndarray.tobytes(order='C') Construct Python bytes containing the raw data bytes in the array. Constructs Python bytes showing a copy of the raw contents of data memory. The bytes object can be produced in either ?C? or ?Fortran?, or ?Any? order (the default is ?C?-order). ?Any? order means C-order unless the F_CONTIGUOUS flag in the array is set, in which case it means ?Fortran? order. New in version 1.9.0. Parameters: order : {?C?, ?F?, None}, optional Order of the data for multidimens

ndarray.take()

ndarray.take(indices, axis=None, out=None, mode='raise') Return an array formed from the elements of a at the given indices. Refer to numpy.take for full documentation. See also numpy.take equivalent function

ndarray.T

ndarray.T Same as self.transpose(), except that self is returned if self.ndim < 2. Examples >>> x = np.array([[1.,2.],[3.,4.]]) >>> x array([[ 1., 2.], [ 3., 4.]]) >>> x.T array([[ 1., 3.], [ 2., 4.]]) >>> x = np.array([1.,2.,3.,4.]) >>> x array([ 1., 2., 3., 4.]) >>> x.T array([ 1., 2., 3., 4.])

ndarray.swapaxes()

ndarray.swapaxes(axis1, axis2) Return a view of the array with axis1 and axis2 interchanged. Refer to numpy.swapaxes for full documentation. See also numpy.swapaxes equivalent function

ndarray.sum()

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

ndarray.strides

ndarray.strides Tuple of bytes to step in each dimension when traversing an array. The byte offset of element (i[0], i[1], ..., i[n]) in an array a is: offset = sum(np.array(i) * a.strides) A more detailed explanation of strides can be found in the ?ndarray.rst? file in the NumPy reference guide. See also numpy.lib.stride_tricks.as_strided Notes Imagine an array of 32-bit integers (each 4 bytes): x = np.array([[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]], dtype=np.int32) This array i

ndarray.std()

ndarray.std(axis=None, dtype=None, out=None, ddof=0, keepdims=False) Returns the standard deviation of the array elements along given axis. Refer to numpy.std for full documentation. See also numpy.std equivalent function

ndarray.squeeze()

ndarray.squeeze(axis=None) Remove single-dimensional entries from the shape of a. Refer to numpy.squeeze for full documentation. See also numpy.squeeze equivalent function