neulab/docprompting-conala huggingface dataset:
numpy.matrix.strides attribute   matrix.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 is stored in memory as 40 bytes, one after the other (known as a contiguous block of memory). The strides of an array tell us how many bytes we have to skip in memory to move to the next position along a certain axis. For example, we have to skip 4 bytes (1 value) to move to the next column, but 20 bytes (5 values) to get to the same position in the next row. As such, the strides for the array x will be (20, 4). Examples >>> y = np.reshape(np.arange(2*3*4), (2,3,4))
>>> y
array([[[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]],
       [[12, 13, 14, 15],
        [16, 17, 18, 19],
        [20, 21, 22, 23]]])
>>> y.strides
(48, 16, 4)
>>> y[1,1,1]
17
>>> offset=sum(y.strides * np.array((1,1,1)))
>>> offset/y.itemsize
17
 >>> x = np.reshape(np.arange(5*6*7*8), (5,6,7,8)).transpose(2,3,1,0)
>>> x.strides
(32, 4, 224, 1344)
>>> i = np.array([3,5,2,2])
>>> offset = sum(i * x.strides)
>>> x[3,5,2,2]
813
>>> offset / x.itemsize
813
numpy.matrix.sum method   matrix.sum(axis=None, dtype=None, out=None)[source]
 
Returns the sum of the matrix elements, along the given axis. Refer to numpy.sum for full documentation.  See also  numpy.sum
  Notes This is the same as ndarray.sum, except that where an ndarray would be returned, a matrix object is returned instead. Examples >>> x = np.matrix([[1, 2], [4, 3]])
>>> x.sum()
10
>>> x.sum(axis=1)
matrix([[3],
        [7]])
>>> x.sum(axis=1, dtype='float')
matrix([[3.],
        [7.]])
>>> out = np.zeros((2, 1), dtype='float')
>>> x.sum(axis=1, dtype='float', out=np.asmatrix(out))
matrix([[3.],
        [7.]])
numpy.matrix.swapaxes method   matrix.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
numpy.matrix.take method   matrix.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
numpy.matrix.tobytes method   matrix.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 is produced in C-order by default. This behavior is controlled by the order parameter.  New in version 1.9.0.   Parameters 
 
order{‘C’, ‘F’, ‘A’}, optional


Controls the memory layout of the bytes object. ‘C’ means C-order, ‘F’ means F-order, ‘A’ (short for Any) means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. Default is ‘C’.    Returns 
 
sbytes


Python bytes exhibiting a copy of a’s raw data.     Examples >>> x = np.array([[0, 1], [2, 3]], dtype='<u2')
>>> x.tobytes()
b'\x00\x00\x01\x00\x02\x00\x03\x00'
>>> x.tobytes('C') == x.tobytes()
True
>>> x.tobytes('F')
b'\x00\x00\x02\x00\x01\x00\x03\x00'
numpy.matrix.tofile method   matrix.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 
 
fidfile or str or Path


An open file object, or a string containing a filename.  Changed in version 1.17.0: pathlib.Path objects are now accepted.   
sepstr


Separator between array items for text output. If “” (empty), a binary file is written, equivalent to file.write(a.tobytes()).  
formatstr


Format string for text file output. Each entry in the array is formatted to text by first converting it to the closest Python type, and then using “format” % item.     Notes This is a convenience function for quick storage of array data. Information on endianness and precision is lost, so this method is not a good choice for files intended to archive data or transport data between machines with different endianness. Some of these problems can be overcome by outputting the data as text files, at the expense of speed and file size. When fid is a file object, array contents are directly written to the file, bypassing the file object’s write method. As a result, tofile cannot be used with files objects supporting compression (e.g., GzipFile) or file-like objects that do not support fileno() (e.g., BytesIO).
numpy.matrix.tolist method   matrix.tolist()[source]
 
Return the matrix as a (possibly nested) list. See ndarray.tolist for full documentation.  See also  ndarray.tolist
  Examples >>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.tolist()
[[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]]
numpy.matrix.tostring method   matrix.tostring(order='C')
 
A compatibility alias for tobytes, with exactly the same behavior. Despite its name, it returns bytes not strs.  Deprecated since version 1.19.0.
numpy.matrix.trace method   matrix.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None)
 
Return the sum along diagonals of the array. Refer to numpy.trace for full documentation.  See also  numpy.trace

equivalent function
numpy.matrix.transpose method   matrix.transpose(*axes)
 
Returns a view of the array with axes transposed. For a 1-D array this has no effect, as a transposed vector is simply the same vector. To convert a 1-D array into a 2D column vector, an additional dimension must be added. np.atleast2d(a).T achieves this, as does a[:, np.newaxis]. For a 2-D array, this is a standard matrix transpose. For an n-D array, if axes are given, their order indicates how the axes are permuted (see Examples). If axes are not provided and a.shape = (i[0], i[1], ... i[n-2], i[n-1]), then a.transpose().shape = (i[n-1], i[n-2], ... i[1], i[0]).  Parameters 
 
axesNone, tuple of ints, or n ints


 None or no argument: reverses the order of the axes. tuple of ints: i in the j-th place in the tuple means a’s i-th axis becomes a.transpose()’s j-th axis. 
n ints: same as an n-tuple of the same ints (this form is intended simply as a “convenience” alternative to the tuple form)     Returns 
 
outndarray


View of a, with axes suitably permuted.      See also  transpose

Equivalent function  ndarray.T

Array property returning the array transposed.  ndarray.reshape

Give a new shape to an array without changing its data.    Examples >>> a = np.array([[1, 2], [3, 4]])
>>> a
array([[1, 2],
       [3, 4]])
>>> a.transpose()
array([[1, 3],
       [2, 4]])
>>> a.transpose((1, 0))
array([[1, 3],
       [2, 4]])
>>> a.transpose(1, 0)
array([[1, 3],
       [2, 4]])
numpy.matrix.var method   matrix.var(axis=None, dtype=None, out=None, ddof=0)[source]
 
Returns the variance of the matrix elements, along the given axis. Refer to numpy.var for full documentation.  See also  numpy.var
  Notes This is the same as ndarray.var, except that where an ndarray would be returned, a matrix object is returned instead. Examples >>> x = np.matrix(np.arange(12).reshape((3, 4)))
>>> x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.var()
11.916666666666666
>>> x.var(0)
matrix([[ 10.66666667,  10.66666667,  10.66666667,  10.66666667]]) # may vary
>>> x.var(1)
matrix([[1.25],
        [1.25],
        [1.25]])
numpy.matrix.view method   matrix.view([dtype][, type])
 
New view of array with the same data.  Note Passing None for dtype is different from omitting the parameter, since the former invokes dtype(None) which is an alias for dtype('float_').   Parameters 
 
dtypedata-type or ndarray sub-class, optional


Data-type descriptor of the returned view, e.g., float32 or int16. Omitting it results in the view having the same data-type as a. This argument can also be specified as an ndarray sub-class, which then specifies the type of the returned object (this is equivalent to setting the type parameter).  
typePython type, optional


Type of the returned view, e.g., ndarray or matrix. Again, omission of the parameter results in type preservation.     Notes a.view() is used two different ways: a.view(some_dtype) or a.view(dtype=some_dtype) constructs a view of the array’s memory with a different data-type. This can cause a reinterpretation of the bytes of memory. a.view(ndarray_subclass) or a.view(type=ndarray_subclass) just returns an instance of ndarray_subclass that looks at the same array (same shape, dtype, etc.) This does not cause a reinterpretation of the memory. For a.view(some_dtype), if some_dtype has a different number of bytes per entry than the previous dtype (for example, converting a regular array to a structured array), then the behavior of the view cannot be predicted just from the superficial appearance of a (shown by print(a)). It also depends on exactly how a is stored in memory. Therefore if a is C-ordered versus fortran-ordered, versus defined as a slice or transpose, etc., the view may give different results. Examples >>> x = np.array([(1, 2)], dtype=[('a', np.int8), ('b', np.int8)])
 Viewing array data using a different type and dtype: >>> y = x.view(dtype=np.int16, type=np.matrix)
>>> y
matrix([[513]], dtype=int16)
>>> print(type(y))
<class 'numpy.matrix'>
 Creating a view on a structured array so it can be used in calculations >>> x = np.array([(1, 2),(3,4)], dtype=[('a', np.int8), ('b', np.int8)])
>>> xv = x.view(dtype=np.int8).reshape(-1,2)
>>> xv
array([[1, 2],
       [3, 4]], dtype=int8)
>>> xv.mean(0)
array([2.,  3.])
 Making changes to the view changes the underlying array >>> xv[0,1] = 20
>>> x
array([(1, 20), (3,  4)], dtype=[('a', 'i1'), ('b', 'i1')])
 Using a view to convert an array to a recarray: >>> z = x.view(np.recarray)
>>> z.a
array([1, 3], dtype=int8)
 Views share data: >>> x[0] = (9, 10)
>>> z[0]
(9, 10)
 Views that change the dtype size (bytes per entry) should normally be avoided on arrays defined by slices, transposes, fortran-ordering, etc.: >>> x = np.array([[1,2,3],[4,5,6]], dtype=np.int16)
>>> y = x[:, 0:2]
>>> y
array([[1, 2],
       [4, 5]], dtype=int16)
>>> y.view(dtype=[('width', np.int16), ('length', np.int16)])
Traceback (most recent call last):
    ...
ValueError: To change to a dtype of a different size, the array must be C-contiguous
>>> z = y.copy()
>>> z.view(dtype=[('width', np.int16), ('length', np.int16)])
array([[(1, 2)],
       [(4, 5)]], dtype=[('width', '<i2'), ('length', '<i2')])
numpy.memmap.flush method   memmap.flush()[source]
 
Write any changes in the array to the file on disk. For further information, see memmap.  Parameters 
 None
    See also  memmap
numpy.ndarray.__add__ method   ndarray.__add__(value, /)
 
Return self+value.
numpy.ndarray.__and__ method   ndarray.__and__(value, /)
 
Return self&value.
numpy.ndarray.__array__ method   ndarray.__array__([dtype, ]/) → reference if type unchanged, copy otherwise.
 
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 dtype of the array.
numpy.ndarray.__array_wrap__ method   ndarray.__array_wrap__(array, [context, ]/)
 
Returns a view of array with the same type as self.
numpy.ndarray.__bool__ method   ndarray.__bool__(/)
 
self != 0
numpy.ndarray.__class_getitem__ method   ndarray.__class_getitem__(item, /)
 
Return a parametrized wrapper around the ndarray type.  New in version 1.22.   Returns 
 
aliastypes.GenericAlias


A parametrized ndarray type.      See also  PEP 585

Type hinting generics in standard collections.  numpy.typing.NDArray

An ndarray alias generic w.r.t. its dtype.type.    Notes This method is only available for python 3.9 and later. Examples >>> from typing import Any
>>> import numpy as np
 >>> np.ndarray[Any, np.dtype[Any]]
numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]
numpy.ndarray.__contains__ method   ndarray.__contains__(key, /)
 
Return key in self.
numpy.ndarray.__copy__ method   ndarray.__copy__()
 
Used if copy.copy is called on an array. Returns a copy of the array. Equivalent to a.copy(order='K').
numpy.ndarray.__deepcopy__ method   ndarray.__deepcopy__(memo, /) → Deep copy of array.
 
Used if copy.deepcopy is called on an array.
numpy.ndarray.__divmod__ method   ndarray.__divmod__(value, /)
 
Return divmod(self, value).
numpy.ndarray.__eq__ method   ndarray.__eq__(value, /)
 
Return self==value.
numpy.ndarray.__floordiv__ method   ndarray.__floordiv__(value, /)
 
Return self//value.
numpy.ndarray.__ge__ method   ndarray.__ge__(value, /)
 
Return self>=value.
numpy.ndarray.__getitem__ method   ndarray.__getitem__(key, /)
 
Return self[key].
numpy.ndarray.__gt__ method   ndarray.__gt__(value, /)
 
Return self>value.
numpy.ndarray.__iadd__ method   ndarray.__iadd__(value, /)
 
Return self+=value.
numpy.ndarray.__iand__ method   ndarray.__iand__(value, /)
 
Return self&=value.
numpy.ndarray.__ifloordiv__ method   ndarray.__ifloordiv__(value, /)
 
Return self//=value.
numpy.ndarray.__ilshift__ method   ndarray.__ilshift__(value, /)
 
Return self<<=value.
numpy.ndarray.__imod__ method   ndarray.__imod__(value, /)
 
Return self%=value.
numpy.ndarray.__imul__ method   ndarray.__imul__(value, /)
 
Return self*=value.
numpy.ndarray.__invert__ method   ndarray.__invert__(/)
 
~self
numpy.ndarray.__ior__ method   ndarray.__ior__(value, /)
 
Return self|=value.
numpy.ndarray.__ipow__ method   ndarray.__ipow__(value, /)
 
Return self**=value.
numpy.ndarray.__irshift__ method   ndarray.__irshift__(value, /)
 
Return self>>=value.
numpy.ndarray.__isub__ method   ndarray.__isub__(value, /)
 
Return self-=value.
numpy.ndarray.__itruediv__ method   ndarray.__itruediv__(value, /)
 
Return self/=value.
numpy.ndarray.__ixor__ method   ndarray.__ixor__(value, /)
 
Return self^=value.
numpy.ndarray.__le__ method   ndarray.__le__(value, /)
 
Return self<=value.
numpy.ndarray.__len__ method   ndarray.__len__(/)
 
Return len(self).
numpy.ndarray.__lshift__ method   ndarray.__lshift__(value, /)
 
Return self<<value.
numpy.ndarray.__lt__ method   ndarray.__lt__(value, /)
 
Return self<value.
numpy.ndarray.__matmul__ method   ndarray.__matmul__(value, /)
 
Return self@value.
numpy.ndarray.__mod__ method   ndarray.__mod__(value, /)
 
Return self%value.
numpy.ndarray.__mul__ method   ndarray.__mul__(value, /)
 
Return self*value.
numpy.ndarray.__ne__ method   ndarray.__ne__(value, /)
 
Return self!=value.
numpy.ndarray.__or__ method   ndarray.__or__(value, /)
 
Return self|value.
numpy.ndarray.__pow__ method   ndarray.__pow__(value, mod=None, /)
 
Return pow(self, value, mod).
numpy.ndarray.__reduce__ method   ndarray.__reduce__()
 
For pickling.
numpy.ndarray.__repr__ method   ndarray.__repr__(/)
 
Return repr(self).
numpy.ndarray.__rshift__ method   ndarray.__rshift__(value, /)
 
Return self>>value.
numpy.ndarray.__setitem__ method   ndarray.__setitem__(key, value, /)
 
Set self[key] to value.
numpy.ndarray.__setstate__ method   ndarray.__setstate__(state, /)
 
For unpickling. The state argument must be a sequence that contains the following elements:  Parameters 
 
versionint


optional pickle version. If omitted defaults to 0.  
shapetuple


dtypedata-type


isFortranbool


rawdatastring or list


a binary string with the data (or a list if ‘a’ is an object array)
numpy.ndarray.__str__ method   ndarray.__str__(/)
 
Return str(self).
numpy.ndarray.__sub__ method   ndarray.__sub__(value, /)
 
Return self-value.
numpy.ndarray.__truediv__ method   ndarray.__truediv__(value, /)
 
Return self/value.
numpy.ndarray.__xor__ method   ndarray.__xor__(value, /)
 
Return self^value.
numpy.ndarray.all method   ndarray.all(axis=None, out=None, keepdims=False, *, where=True)
 
Returns True if all elements evaluate to True. Refer to numpy.all for full documentation.  See also  numpy.all

equivalent function
numpy.ndarray.any method   ndarray.any(axis=None, out=None, keepdims=False, *, where=True)
 
Returns True if any of the elements of a evaluate to True. Refer to numpy.any for full documentation.  See also  numpy.any

equivalent function
numpy.ndarray.argmax method   ndarray.argmax(axis=None, out=None)
 
Return indices of the maximum values along the given axis. Refer to numpy.argmax for full documentation.  See also  numpy.argmax

equivalent function
numpy.ndarray.argmin method   ndarray.argmin(axis=None, out=None)
 
Return indices of the minimum values along the given axis. Refer to numpy.argmin for detailed documentation.  See also  numpy.argmin

equivalent function
numpy.ndarray.argpartition method   ndarray.argpartition(kth, axis=- 1, kind='introselect', order=None)
 
Returns the indices that would partition this array. Refer to numpy.argpartition for full documentation.  New in version 1.8.0.   See also  numpy.argpartition

equivalent function
numpy.ndarray.argsort method   ndarray.argsort(axis=- 1, kind=None, order=None)
 
Returns the indices that would sort this array. Refer to numpy.argsort for full documentation.  See also  numpy.argsort

equivalent function
numpy.ndarray.astype method   ndarray.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)
 
Copy of the array, cast to a specified type.  Parameters 
 
dtypestr or dtype


Typecode or data-type to which the array is cast.  
order{‘C’, ‘F’, ‘A’, ‘K’}, optional


Controls the memory layout order of the result. ‘C’ means C order, ‘F’ means Fortran order, ‘A’ means ‘F’ order if all the arrays are Fortran contiguous, ‘C’ order otherwise, and ‘K’ means as close to the order the array elements appear in memory as possible. Default is ‘K’.  
casting{‘no’, ‘equiv’, ‘safe’, ‘same_kind’, ‘unsafe’}, optional


Controls what kind of data casting may occur. Defaults to ‘unsafe’ for backwards compatibility.  ‘no’ means the data types should not be cast at all. ‘equiv’ means only byte-order changes are allowed. ‘safe’ means only casts which can preserve values are allowed. ‘same_kind’ means only safe casts or casts within a kind, like float64 to float32, are allowed. ‘unsafe’ means any data conversions may be done.   
subokbool, optional


If True, then sub-classes will be passed-through (default), otherwise the returned array will be forced to be a base-class array.  
copybool, optional


By default, astype always returns a newly allocated array. If this is set to false, and the dtype, order, and subok requirements are satisfied, the input array is returned instead of a copy.    Returns 
 
arr_tndarray


Unless copy is False and the other conditions for returning the input array are satisfied (see description for copy input parameter), arr_t is a new array of the same shape as the input array, with dtype, order given by dtype, order.    Raises 
 ComplexWarning

When casting from complex to float or int. To avoid this, one should use a.real.astype(t).     Notes  Changed in version 1.17.0: Casting between a simple data type and a structured one is possible only for “unsafe” casting. Casting to multiple fields is allowed, but casting from multiple fields is not.   Changed in version 1.9.0: Casting from numeric to string types in ‘safe’ casting mode requires that the string dtype length is long enough to store the max integer/float value converted.  Examples >>> x = np.array([1, 2, 2.5])
>>> x
array([1. ,  2. ,  2.5])
 >>> x.astype(int)
array([1, 2, 2])
numpy.ndarray.base attribute   ndarray.base
 
Base object if memory is from some other object. Examples The base of an array that owns its memory is None: >>> x = np.array([1,2,3,4])
>>> x.base is None
True
 Slicing creates a view, whose memory is shared with x: >>> y = x[2:]
>>> y.base is x
True
numpy.ndarray.byteswap method   ndarray.byteswap(inplace=False)
 
Swap the bytes of the array elements Toggle between low-endian and big-endian data representation by returning a byteswapped array, optionally swapped in-place. Arrays of byte-strings are not swapped. The real and imaginary parts of a complex number are swapped individually.  Parameters 
 
inplacebool, optional


If True, swap bytes in-place, default is False.    Returns 
 
outndarray


The byteswapped array. If inplace is True, this is a view to self.     Examples >>> A = np.array([1, 256, 8755], dtype=np.int16)
>>> list(map(hex, A))
['0x1', '0x100', '0x2233']
>>> A.byteswap(inplace=True)
array([  256,     1, 13090], dtype=int16)
>>> list(map(hex, A))
['0x100', '0x1', '0x3322']
 Arrays of byte-strings are not swapped >>> A = np.array([b'ceg', b'fac'])
>>> A.byteswap()
array([b'ceg', b'fac'], dtype='|S3')
  
A.newbyteorder().byteswap() produces an array with the same values

but different representation in memory   >>> A = np.array([1, 2, 3])
>>> A.view(np.uint8)
array([1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
       0, 0], dtype=uint8)
>>> A.newbyteorder().byteswap(inplace=True)
array([1, 2, 3])
>>> A.view(np.uint8)
array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
       0, 3], dtype=uint8)
numpy.ndarray.choose method   ndarray.choose(choices, out=None, mode='raise')
 
Use an index array to construct a new array from a set of choices. Refer to numpy.choose for full documentation.  See also  numpy.choose

equivalent function
numpy.ndarray.clip method   ndarray.clip(min=None, max=None, out=None, **kwargs)
 
Return an array whose values are limited to [min, max]. One of max or min must be given. Refer to numpy.clip for full documentation.  See also  numpy.clip

equivalent function
numpy.ndarray.compress method   ndarray.compress(condition, axis=None, out=None)
 
Return selected slices of this array along given axis. Refer to numpy.compress for full documentation.  See also  numpy.compress

equivalent function
numpy.ndarray.conj method   ndarray.conj()
 
Complex-conjugate all elements. Refer to numpy.conjugate for full documentation.  See also  numpy.conjugate

equivalent function
numpy.ndarray.conjugate method   ndarray.conjugate()
 
Return the complex conjugate, element-wise. Refer to numpy.conjugate for full documentation.  See also  numpy.conjugate

equivalent function
numpy.ndarray.copy method   ndarray.copy(order='C')
 
Return a copy of the array.  Parameters 
 
order{‘C’, ‘F’, ‘A’, ‘K’}, optional


Controls the memory layout of the copy. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. ‘K’ means match the layout of a as closely as possible. (Note that this function and numpy.copy are very similar but have different default values for their order= arguments, and this function always passes sub-classes through.)      See also  numpy.copy

Similar function with different default behavior  numpy.copyto
  Notes This function is the preferred method for creating an array copy. The function numpy.copy is similar, but it defaults to using order ‘K’, and will not pass sub-classes through by default. Examples >>> x = np.array([[1,2,3],[4,5,6]], order='F')
 >>> y = x.copy()
 >>> x.fill(0)
 >>> x
array([[0, 0, 0],
       [0, 0, 0]])
 >>> y
array([[1, 2, 3],
       [4, 5, 6]])
 >>> y.flags['C_CONTIGUOUS']
True
numpy.ndarray.cumprod method   ndarray.cumprod(axis=None, dtype=None, out=None)
 
Return the cumulative product of the elements along the given axis. Refer to numpy.cumprod for full documentation.  See also  numpy.cumprod

equivalent function
numpy.ndarray.cumsum method   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
numpy.ndarray.data attribute   ndarray.data
 
Python buffer object pointing to the start of the array’s data.
numpy.ndarray.diagonal method   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