ndarray.flags

ndarray.flags Information about the memory layout of the array. Notes The flags object can be accessed dictionary-like (as in a.flags['WRITEABLE']), or by using lowercased attribute names (as in a.flags.writeable). Short flag names are only supported in dictionary access. Only the UPDATEIFCOPY, WRITEABLE, and ALIGNED flags can be changed by the user, via direct assignment to the attribute or dictionary entry, or by calling ndarray.setflags. The array flags cannot be set arbitrarily: UPDATEI

ndarray.dumps()

ndarray.dumps() Returns the pickle of the array as a string. pickle.loads or numpy.loads will convert the string back to an array. Parameters: None

ndarray.fill()

ndarray.fill(value) Fill the array with a scalar value. Parameters: value : scalar All elements of a will be assigned this value. Examples >>> a = np.array([1, 2]) >>> a.fill(0) >>> a array([0, 0]) >>> a = np.empty(2) >>> a.fill(1) >>> a array([ 1., 1.])

ndarray.dump()

ndarray.dump(file) Dump a pickle of the array to the specified file. The array can be read back with pickle.load or numpy.load. Parameters: file : str A string naming the dump file.

ndarray.dtype

ndarray.dtype Data-type of the array?s elements. Parameters: None Returns: d : numpy dtype object See also numpy.dtype Examples >>> x array([[0, 1], [2, 3]]) >>> x.dtype dtype('int32') >>> type(x.dtype) <type 'numpy.dtype'>

ndarray.dot()

ndarray.dot(b, out=None) Dot product of two arrays. Refer to numpy.dot for full documentation. See also numpy.dot equivalent function Examples >>> a = np.eye(2) >>> b = np.ones((2, 2)) * 2 >>> a.dot(b) array([[ 2., 2.], [ 2., 2.]]) This array method can be conveniently chained: >>> a.dot(b).dot(b) array([[ 8., 8.], [ 8., 8.]])

ndarray.data

ndarray.data Python buffer object pointing to the start of the array?s data.

ndarray.cumsum()

ndarray.cumsum(axis=None, dtype=None, out=None) Return the cumulative sum of the elements along the given axis. Refer to numpy.cumsum for full documentation. See also numpy.cumsum equivalent function

ndarray.diagonal()

ndarray.diagonal(offset=0, axis1=0, axis2=1) Return specified diagonals. In NumPy 1.9 the returned array is a read-only view instead of a copy as in previous NumPy versions. In a future version the read-only restriction will be removed. Refer to numpy.diagonal for full documentation. See also numpy.diagonal equivalent function

ndarray.ctypes

ndarray.ctypes An object to simplify the interaction of the array with the ctypes module. This attribute creates an object that makes it easier to use arrays when calling shared libraries with the ctypes module. The returned object has, among others, data, shape, and strides attributes (see Notes below) which themselves return ctypes objects that can be used as arguments to a shared library. Parameters: None Returns: c : Python object Possessing attributes data, shape, strides, etc.