Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 1


Markdown
## Universal Functions (ufunc)

...



### Math operations

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.add	|Adds two arrays elementwise.	|

...

1	|	|

...


|numpy.subtract	|Subtracts arguments elementwise.	|

...

1	|	|

...


|numpy.multiply	|Multiplies two arrays elementwise.	|

...

1	|	|

...


|numpy.divide	|Elementwise true division (i.e.	|

...

1	|	|

...


|numpy.logaddexp	|Computes ``log(exp(x1)` `+` `exp(x2))`` elementwise.	|

...

1	|[PR15495](https://github.com/apache/incubator-mxnet/pull/15495)	|

...


|numpy.logaddexp2	|Computes ``log2(exp2(x1)` `+` `exp2(x2))`` elementwise.	|

...

1	|[PR15494](https://github.com/apache/incubator-mxnet/pull/15494)	|

...


|numpy.true_divide	|Elementwise true division (i.e.	|

...

1	|Need a frontend interface called np.true_divide	|

...


|numpy.floor_divide	|Elementwise floor division (i.e.	|

...

1	|	|

...


|numpy.negative	|Takes numerical negative elementwise.	|

...

1	|	|

...


|numpy.power	|Computes ``x1` `**` `x2`` elementwise.	|

...

1	|	|

...


|numpy.remainder	|Computes the remainder of Python division elementwise.	|

...

1	|[PR16080](https://github.com/apache/incubator-mxnet/pull/16080)	|

...


|numpy.mod	|Computes the remainder of Python division elementwise.	|

...

1	|	|

...


|numpy.fmod	|Computes the remainder of C division elementwise.	|	|	|

...


|numpy.absolute	|Elementwise absolute value function.	|

...

1	|abs	|

...


|numpy.rint	|Rounds each element of an array to the nearest integer.	|

...

1	|	|

...


|numpy.sign	|Elementwise sign function.	|

...

1	|	|

...


|numpy.exp	|Elementwise exponential function.	|

...

1	|	|

...


|numpy.exp2	|Elementwise exponentiation with base 2.	|

...

1	|[PR15973](https://github.com/apache/incubator-mxnet/pull/15973)	|

...


|numpy.log	|Elementwise natural logarithm function.	|

...

1	|	|

...


|numpy.log2	|Elementwise binary logarithm function.	|

...

1	|	|

...


|numpy.log10	|Elementwise common logarithm function.	|

...

1	|	|

...


|numpy.expm1	|Computes ``exp(x)` `-` `1`` elementwise.	|

...

1	|	|

...


|numpy.log1p	|Computes ``log(1` `+` `x)`` elementwise.	|

...

1	|	|

...


|numpy.sqrt	|Elementwise square root function.	|

...

1	|	|

...


|numpy.square	|Elementwise square function.	|

...

1	|	|

...


|numpy.reciprocal	|Computes ``1` `/` `x`` elementwise.	|

...

1	|	|

...



### Trigonometric functions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.sin	|Elementwise sine function.	|

...

1	|	|

...


|numpy.cos	|Elementwise cosine function.	|

...

1	|	|

...


|numpy.tan	|Elementwise tangent function.	|

...

1	|	|

...


|numpy.arcsin	|Elementwise inverse-sine function (a.k.a.	|

...

1	|	|

...


|numpy.arccos	|Elementwise inverse-cosine function (a.k.a.	|

...

1	|	|

...


|numpy.arctan	|Elementwise inverse-tangent function (a.k.a.	|

...

1	|	|

...


|numpy.arctan2	|Elementwise inverse-tangent of the ratio of two arrays.	|

...

1	|[PR15519](https://github.com/apache/incubator-mxnet/pull/15519)	|

...


|numpy.hypot	|Computes the hypoteneous of orthogonal vectors of given length.	|	|[PR15901](https://github.com/apache/incubator-mxnet/pull/15901)	|

...


|numpy.sinh	|Elementwise hyperbolic sine function.	|

...

1	|	|

...


|numpy.cosh	|Elementwise hyperbolic cosine function.	|

...

1	|	|

...


|numpy.tanh	|Elementwise hyperbolic tangent function.	|

...

1	|	|

...


|numpy.arcsinh	|Elementwise inverse of hyperbolic sine function.	|

...

1	|	|

...


|numpy.arccosh	|Elementwise inverse of hyperbolic cosine function.	|

...

1	|	|

...


|numpy.arctanh	|Elementwise inverse of hyperbolic tangent function.	|

...

1	|	|

...


|numpy.deg2rad	|Converts angles from degrees to radians elementwise.	|	|WIP(tvm): tinying@	|

...


|numpy.rad2deg	|Converts angles from radians to degrees elementwise.	|	|WIP(tvm): tinying@	|

...



### Bit-twiddling functions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.bitwise_and	|Computes the bitwise AND of two arrays elementwise.	|	|	|

...


|numpy.bitwise_or	|Computes the bitwise OR of two arrays elementwise.	|	|[PR15293](https://github.com/apache/incubator-mxnet/pull/15293)	|

...


|numpy.bitwise_xor	|Computes the bitwise XOR of two arrays elementwise.	|	|[PR15312](https://github.com/apache/incubator-mxnet/pull/15312)	|

...


|numpy.invert	|Computes the bitwise NOT of an array elementwise.	|	|	|

...


|numpy.left_shift	|Shifts the bits of each integer element to the left.	|	|	|

...


|numpy.right_shift	|Shifts the bits of each integer element to the right.	|	|	|

...



### Comparison functions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.greater	|Tests elementwise if ``x1` `>` `x2``.	|

...

1	|https://github.com/apache/incubator-mxnet/pull/15940	|

...


|numpy.greater_equal	|Tests elementwise if ``x1` `>=` `x2``.	|

...

1	|

...


|numpy.less	|Tests elementwise if ``x1` `<` `x2``.	|

...

1	|

...


|numpy.less_equal	|Tests elementwise if ``x1` `<=` `x2``.	|

...

1	|

...


|numpy.not_equal	|Tests elementwise if ``x1` `!=` `x2``.	|

...

1	|

...


|numpy.equal	|Tests elementwise if ``x1` `==` `x2``.	|

...

1	|

...


|numpy.logical_and	|Computes the logical AND of two arrays.	|	|	|

...


|numpy.logical_or	|Computes the logical OR of two arrays.	|	|	|

...


|numpy.logical_xor	|Computes the logical XOR of two arrays.	|	|	|

...


|numpy.logical_not	|Computes the logical NOT of an array.	|

...

1	|	|

...


|numpy.maximum	|Takes the maximum of two arrays elementwise.	|

...

1	|	|

...


|numpy.minimum	|Takes the minimum of two arrays elementwise.	|

...

1	|	|

...


|numpy.fmax	|Takes the maximum of two arrays elementwise.	|

...

1	|WIP(tvm) guangtai@  #15800	|

...


|numpy.fmin	|Takes the minimum of two arrays elementwise.	|

...

1	|

...



### Floating functions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.isfinite	|Tests finiteness elementwise.	|	|	|

...


|numpy.isinf	|Tests if each element is the positive or negative infinity.	|	|	|

...


|numpy.isnan	|Tests if each element is a NaN.	|	|	|

...


|numpy.signbit	|Tests elementwise if the sign bit is set (i.e.	|	|	|

...


|numpy.copysign	|Returns the first argument with the sign bit of the second elementwise.	|

...

1	|	|

...


|numpy.nextafter	|Computes the nearest neighbor float values towards the second argument.	|	|	|

...


|numpy.modf	|Extracts the fractional and integral parts of an array elementwise.	|	|	|

...


|numpy.ldexp	|Computes ``x1` `*` `2` `**` `x2`` elementwise.	|	|TODO: guangtai@	|

...


|numpy.frexp	|Decomposes each element to mantissa and two’s exponent.	|	|TODO: guangtai@	|

...


|numpy.fmod	|Computes the remainder of C division elementwise.	|	|	|

...


|numpy.floor	|Rounds each element of an array to its floor integer.	|

...

1	|	|

...


|numpy.ceil	|Rounds each element of an array to its ceiling integer.	|

...

1	|	|

...


|numpy.trunc	|Rounds each element of an array towards zero.	|

...

1	|	|

...



## [ufunc.at](http://ufunc.at/)

...



Currently, CuPy does not support ``at`` for ufuncs in general. However, [``cupyx.scatter_add()

...




## Array Creation Routines

...



### Basic creation routines

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.empty	|Returns an array without initializing the elements.	|

...

1	|	|

...


|numpy.empty_like	|Returns a new array with same shape and dtype of a given array.	|	|	|

...


|numpy.eye	|Returns a 2-D array with ones on the diagonals and zeros elsewhere.	|

...

1	|	|

...


|numpy.identity	|Returns a 2-D identity array.	|

...

1	|[PR15698](https://github.com/apache/incubator-mxnet/pull/15698)	|

...


|numpy.ones	|Returns a new array of given shape and dtype, filled with ones.	|

...

1	|	|

...


|numpy.ones_like	|Returns an array of ones with same shape and dtype as a given array.	|

...

1	|	|

...


|numpy.zeros	|Returns a new array of given shape and dtype, filled with zeros.	|

...

1	|	|

...


|numpy.zeros_like	|Returns an array of zeros with same shape and dtype as a given array.	|

...

1	|	|

...


|numpy.full	|Returns a new array of given shape and dtype, filled with a given value.	|

...

1	|[PR15763](https://github.com/apache/incubator-mxnet/pull/15763)	|

...


|numpy.full_like	|Returns a full array with same shape and dtype as a given array.	|	|	|

...



### Creation from other data

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.array	|Creates an array on the current device.	|

...

1	|	|

...


|numpy.asarray	|Converts an object to array.	|	|	|

...


|numpy.asanyarray	|Converts an object to array.	|	|	|

...


|numpy.ascontiguousarray	|Returns a C-contiguous array.	|	|	|

...


|numpy.copy	|Creates a copy of a given array on the current device.	|

...

1	|	|

...



### Numerical ranges

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.arange	|Returns an array with evenly spaced values within a given interval.	|

...

1	|	|

...


|numpy.linspace	|Returns an array with evenly-spaced values within a given interval.	|

...

1	|	|

...


|numpy.logspace	|Returns an array with evenly-spaced values on a log-scale.	|

...

1	|[PR15825](https://github.com/apache/incubator-mxnet/pull/15825)	|

...


|numpy.meshgrid	|Return coordinate matrices from coordinate vectors.	|

...

1	|	|

...


|numpy.mgrid	|Construct a multi-dimensional “meshgrid”.	|

...

1	|[PR15562](https://github.com/apache/incubator-mxnet/pull/15562)	|

...


|numpy.ogrid	|Construct a multi-dimensional “meshgrid”.	|

...

1	|[PR15562](https://github.com/apache/incubator-mxnet/pull/15562)	|

...



### Matrix creation

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.diag	|Returns a diagonal or a diagonal array.	|	|	|

...


|numpy.diagflat	|Creates a diagonal array from the flattened input.	|	|	|

...


|numpy.tri	|Creates an array with ones at and below the given diagonal.	|	|	|

...


|numpy.tril	|Returns a lower triangle of an array.	|

...

1	|[PR15696](https://github.com/apache/incubator-mxnet/pull/15696)	|

...


|numpy.triu	|Returns an upper triangle of an array.	|	|	|

...



## Array Manipulation Routines

...



### Basic operations

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.copyto	|Copies values from one array to another with broadcasting.	|

...

1	|only convenient mode	|

...



### Changing array shape

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.reshape	|Returns an array with new shape and same elements.	|

...

1	|	|

...


|numpy.ravel	|Returns a flattened array.	|	|	|

...



### Transpose-like operations

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.moveaxis	|Moves axes of an array to new positions.	|

...

1	| [PR15826](https://github.com/apache/incubator-mxnet/pull/15826)	|

...


|numpy.rollaxis	|Moves the specified axis backwards to the given place.	|	| 	|

...


|numpy.swapaxes	|Swaps the two axes.	|

...

1	| 	|

...


|numpy.transpose	|Permutes the dimensions of an array.	|

...

1	| 	|

...



### Changing number of dimensions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.atleast_1d	|Converts arrays to arrays with dimensions >= 1.	|	|	|

...


|numpy.atleast_2d	|Converts arrays to arrays with dimensions >= 2.	|	|	|

...


|numpy.atleast_3d	|Converts arrays to arrays with dimensions >= 3.	|	|	|

...


|numpy.broadcast	|Object that performs broadcasting.	|	|	|

...


|numpy.broadcast_to	|Broadcast an array to a given shape.	|

...

1	|	|

...


|numpy.broadcast_arrays	|Broadcasts given arrays.	|

...

1	|	|

...


|numpy.expand_dims	|Expands given arrays.	|

...

1	|	|

...


|numpy.squeeze	|Removes size-one axes from the shape of an array.	|

...

1	|	|

...



### Changing kind of array

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.asarray	|Converts an object to array.	|	|	|

...


|numpy.asanyarray	|Converts an object to array.	|	|	|

...


|numpy.asfortranarray	|Return an array laid out in Fortran order in memory.	|	|	|

...


|numpy.ascontiguousarray	|Returns a C-contiguous array.	|	|	|

...



### Joining arrays

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.concatenate	|Joins arrays along an axis.	|

...

1	|	|

...


|numpy.stack	|Stacks arrays along a new axis.	|

...

1	|	|

...


|numpy.column_stack	|Stacks 1-D and 2-D arrays as columns into a 2-D array.	|	|	|

...


|numpy.dstack	|Stacks arrays along the third axis.	|

...

1	|[PR15314](https://github.com/apache/incubator-mxnet/pull/15314)	|

...


|numpy.hstack	|Stacks arrays horizontally.	|

...

1	|PR15302	|

...


|numpy.vstack	|Stacks arrays vertically.	|

...

1	|PR15325	|

...



### Splitting arrays

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.split	|Splits an array into multiple sub arrays along a given axis.	|

...

1	|	|

...


|numpy.array_split	|Splits an array into multiple sub arrays along a given axis.	|	|	|

...


|numpy.dsplit	|Splits an array into multiple sub arrays along the third axis.	|

...

1	|[PR15371](https://github.com/apache/incubator-mxnet/pull/15371)	|

...


|numpy.hsplit	|Splits an array into multiple sub arrays horizontally.	|

...

1	|[PR15358](https://github.com/apache/incubator-mxnet/pull/15358)	|

...


|numpy.vsplit	|Splits an array into multiple sub arrays along the first axis.	|

...

1	|[PR15346](https://github.com/apache/incubator-mxnet/pull/15346)	|

...



### Tiling arrays

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.tile	|Construct an array by repeating A the number of times given by reps.	|

...

1	|	|

...


|numpy.repeat	|Repeat arrays along an axis.	|

...

1	|	|

...



### Adding and removing elements

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.unique	|Find the unique elements of an array.	|

...

1	|[PR15733](https://github.com/apache/incubator-mxnet/pull/15733)	|

...



### Rearranging elements

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.flip	|Reverse the order of elements in an array along the given axis.	|

...

1	|PR15586	|

...


|numpy.fliplr	|Flip array in the left/right direction.	|	|	|

...


|numpy.flipud	|Flip array in the up/down direction.	|	|	|

...


|numpy.reshape	|Returns an array with new shape and same elements.	|

...

1	|	|

...


|numpy.roll	|Roll array elements along a given axis.	|

...

1	|[PR15902](https://github.com/apache/incubator-mxnet/pull/15902)	|

...


|numpy.rot90	|Rotate an array by 90 degrees in the plane specified by axes.	|

...

1	|[PR15987](https://github.com/apache/incubator-mxnet/pull/15987)	|

...



## Binary OperationsElementwise bit operations

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.bitwise_and	|Computes the bitwise AND of two arrays elementwise.	|	|	|

...


|numpy.bitwise_or	|Computes the bitwise OR of two arrays elementwise.	|	|	|

...


|numpy.bitwise_xor	|Computes the bitwise XOR of two arrays elementwise.	|	|	|

...


|numpy.invert	|Computes the bitwise NOT of an array elementwise.	|	|	|

...


|numpy.left_shift	|Shifts the bits of each integer element to the left.	|	|	|

...


|numpy.right_shift	|Shifts the bits of each integer element to the right.	|	|	|

...



### Bit packing

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.packbits	|Packs the elements of a binary-valued array into bits in a uint8 array.	|	|	|

...


|numpy.unpackbits	|Unpacks elements of a uint8 array into a binary-valued output array.	|	|	|

...



### Output formatting

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.binary_repr	|Return the binary representation of the input number as a string.	|	|	|

...



## FFT Functions

...



### Standard FFTs

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.fft.fft	|Compute the one-dimensional FFT.	|	|	|

...


|numpy.fft.ifft	|Compute the one-dimensional inverse FFT.	|	|	|

...


|numpy.fft.fft2	|Compute the two-dimensional FFT.	|	|	|

...


|numpy.fft.ifft2	|Compute the two-dimensional inverse FFT.	|	|	|

...


|numpy.fft.fftn	|Compute the N-dimensional FFT.	|	|	|

...


|numpy.fft.ifftn	|Compute the N-dimensional inverse FFT.	|	|	|

...



### Real FFTs

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.fft.rfft	|Compute the one-dimensional FFT for real input.	|	|	|

...


|numpy.fft.irfft	|Compute the one-dimensional inverse FFT for real input.	|	|	|

...


|numpy.fft.rfft2	|Compute the two-dimensional FFT for real input.	|	|	|

...


|numpy.fft.irfft2	|Compute the two-dimensional inverse FFT for real input.	|	|	|

...


|numpy.fft.rfftn	|Compute the N-dimensional FFT for real input.	|	|	|

...


|numpy.fft.irfftn	|Compute the N-dimensional inverse FFT for real input.	|	|	|

...



### Hermitian FFTs

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.fft.hfft	|Compute the FFT of a signal that has Hermitian symmetry.	|	|	|

...


|numpy.fft.ihfft	|Compute the FFT of a signal that has Hermitian symmetry.	|	|	|

...



### Helper routines

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.fft.fftfreq	|Return the FFT sample frequencies.	|	|	|

...


|numpy.fft.rfftfreq	|Return the FFT sample frequencies for real input.	|	|	|

...


|numpy.fft.fftshift	|Shift the zero-frequency component to the center of the spectrum.	|	|	|

...


|numpy.fft.ifftshift	|The inverse of [``fftshift()	|	|	|

...



# Indexing Routines

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.c_	|	|	|	|

...


|numpy.r_	|	|	|	|

...


|numpy.nonzero	|Return the indices of the elements that are non-zero.	|	|	|

...


|numpy.where	|Return elements, either from x or y, depending on condition.	|	|	|

...


|numpy.indices	|Returns an array representing the indices of a grid.	|	|	|

...


|numpy.ix_	|i	|	|	|

...


|numpy.unravel_index	|Converts array of flat indices into a tuple of coordinate arrays.	|	|	|

...


|numpy.take	|Takes elements of an array at specified indices along an axis.	|

...

1	|	|

...


|numpy.choose	|	|	|	|

...


|numpy.diag	|Returns a diagonal or a diagonal array.	|	|	|

...


|numpy.diagonal	|Returns specified diagonals.	|	|	|

...


|numpy.lib.stride_tricks.as_strided	|Create a view into the array with the given shape and strides.	|	|	|

...


|numpy.place	|Change elements of an array based on conditional and input values.	|	|	|

...


|numpy.put	|Replaces specified elements of an array with given values.	|	|	|

...


|numpy.fill_diagonal	|Fills the main diagonal of the given array of any dimensionality.	|	|	|

...



## Input and Output

...



### NumPy binary files (NPY, NPZ)

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.load	|Loads arrays or pickled objects from ``.npy``, ``.npz`` or pickled file.	|

...

1	|	|

...


|numpy.save	|Saves an array to a binary file in ``.npy`` format.	|

...

1	|	|

...


|numpy.savez	|Saves one or more arrays into a file in uncompressed ``.npz`` format.	|	|	|

...


|numpy.savez_compressed	|Saves one or more arrays into a file in compressed ``.npz`` format.	|	|	|

...



### String formatting

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.array_repr	|Returns the string representation of an array.	|	|	|

...


|numpy.array_str	|Returns the string representation of the content of an array.	|	|	|

...



### Base-n representations

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.binary_repr	|Return the binary representation of the input number as a string.	|	|	|

...


|numpy.base_repr	|Return a string representation of a number in the given base system.	|	|	|

...



## Linear Algebra

...



### Matrix and vector products

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.dot	|Returns a dot product of two arrays.	|

...

1	|	|

...


|numpy.vdot	|Returns the dot product of two vectors.	|

...

1	|PR in progress	|

...


|numpy.inner	|Returns the inner product of two arrays.	|

...

1	|PR in progress	|

...


|numpy.outer	|Returns the outer product of two vectors.	|

...

1	|PR in progress	|

...


|numpy.matmul	|Returns the matrix product of two arrays and is the implementation of the @ operator introduced in Python 3.5 following PEP465.	|	|dep: einsum	|

...


|numpy.tensordot	|Returns the tensor dot product of two arrays along specified axes.	|

...

1	|[PR15349](https://github.com/apache/incubator-mxnet/pull/15349)	|

...


|numpy.einsum	|Evaluates the Einstein summation convention on the operands.	|

...

1	|[PR15493](https://github.com/apache/incubator-mxnet/pull/15493)	|

...


|numpy.linalg.matrix_power	|Raise a square matrix to the (integer) power n.	|	|dep: matmul	|

...


|numpy.kron	|Returns the kronecker product of two arrays.	|

...

1	|[PR15893](https://github.com/apache/incubator-mxnet/pull/15893)	|

...



### Decompositions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.linalg.cholesky	|Cholesky decomposition.	|	|	|

...


|numpy.linalg.qr	|QR decomposition.	|	|	|

...


|numpy.linalg.svd	|Singular Value Decomposition.	|	|wip	|

...



### Matrix eigenvalues

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.linalg.eigh	|Eigenvalues and eigenvectors of a symmetric matrix.	|	|	|

...


|numpy.linalg.eigvalsh	|Calculates eigenvalues of a symmetric matrix.	|	|	|

...



### Norms etc.

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.linalg.det	|Retruns the deteminant of an array.	|

...

1	|	|

...


|numpy.linalg.norm	|Returns one of matrix norms specified by ``ord`` parameter.	|

...

1	|	|

...


|numpy.linalg.matrix_rank	|Return matrix rank of array using SVD method	|	|	|

...


|numpy.linalg.slogdet	|Returns sign and logarithm of the determinant of an array.	|

...

1	|	|

...


|numpy.trace	|Returns the sum along the diagonals of an array.	|

...

1	|[PR15258](https://github.com/apache/incubator-mxnet/pull/15258)	|

...



### Solving linear equations

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.linalg.solve	|Solves a linear matrix equation.	|	|	|

...


|numpy.linalg.tensorsolve	|Solves tensor equations denoted by ``ax` `=` `b``.	|	|	|

...


|numpy.linalg.inv	|Computes the inverse of a matrix.	|	|	|

...


|numpy.linalg.pinv	|Compute the Moore-Penrose pseudoinverse of a matrix.	|	|	|

...


|numpy.linalg.tensorinv	|Computes the inverse of a tensor.	|	|	|

...


|cupyx.scipy.linalg.lu_factor	|LU decomposition.	|	|	|

...


|cupyx.scipy.linalg.lu_solve	|Solve an equation system, ``a` `*` `x` `=` `b``, given the LU factorization of ``a``	|	|	|

...


|cupyx.scipy.linalg.solve_triangular	|Solve the equation a x = b for x, assuming a is a triangular matrix.	|	|	|

...



## Logic Functions

...



### Truth value testing

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.all	|Tests whether all array elements along a given axis evaluate to True.	|	|	|

...


|numpy.any	|Tests whether any array elements along a given axis evaluate to True.	|	|	|

...



### Infinities and NaNs

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.isfinite	|Tests finiteness elementwise.	|	|	|

...


|numpy.isinf	|Tests if each element is the positive or negative infinity.	|	|	|

...


|numpy.isnan	|Tests if each element is a NaN.	|	|	|

...



### Array type testing

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.iscomplex	|Returns a bool array, where True if input element is complex.	|	|	|

...


|numpy.iscomplexobj	|Check for a complex type or an array of complex numbers.	|	|	|

...


|numpy.isfortran	|Returns True if the array is Fortran contiguous but *not* C contiguous.	|	|	|

...


|numpy.isreal	|Returns a bool array, where True if input element is real.	|	|	|

...


|numpy.isrealobj	|Return True if x is a not complex type or an array of complex numbers.	|	|	|

...


|numpy.isscalar	|Returns True if the type of num is a scalar type.	|	|	|

...



### Logic operations

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.logical_and	|Computes the logical AND of two arrays.	|	|	|

...


|numpy.logical_or	|Computes the logical OR of two arrays.	|	|	|

...


|numpy.logical_not	|Computes the logical NOT of an array.	|

...

1	|	|

...


|numpy.logical_xor	|Computes the logical XOR of two arrays.	|	|	|

...



### Comparison

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.allclose	|Returns True if two arrays are element-wise equal within a tolerance.	|	|	|

...


|numpy.isclose	|Returns a boolean array where two arrays are equal within a tolerance.	|	|	|

...


|numpy.greater	|Tests elementwise if ``x1` `>` `x2``.	|

...

1	|Re-implement to return boolean ndarray	|

...


|numpy.greater_equal	|Tests elementwise if ``x1` `>=` `x2``.	|

...

1	|

...


|numpy.less	|Tests elementwise if ``x1` `<` `x2``.	|

...

1	|

...


|numpy.less_equal	|Tests elementwise if ``x1` `<=` `x2``.	|

...

1	|

...


|numpy.equal	|Tests elementwise if ``x1` `==` `x2``.	|

...

1	|

...


|numpy.not_equal	|Tests elementwise if ``x1` `!=` `x2``.	|

...

1	|

...



## Mathematical Functions

...



### Trigonometric functions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.sin	|Elementwise sine function.	|

...

1	|	|

...


|numpy.cos	|Elementwise cosine function.	|

...

1	|	|

...


|numpy.tan	|Elementwise tangent function.	|

...

1	|	|

...


|numpy.arcsin	|Elementwise inverse-sine function (a.k.a.	|

...

1	|	|

...


|numpy.arccos	|Elementwise inverse-cosine function (a.k.a.	|

...

1	|	|

...


|numpy.arctan	|Elementwise inverse-tangent function (a.k.a.	|

...

1	|	|

...


|numpy.hypot	|Computes the hypoteneous of orthogonal vectors of given length.	|	|[PR15901](https://github.com/apache/incubator-mxnet/pull/15901)	|

...


|numpy.arctan2	|Elementwise inverse-tangent of the ratio of two arrays.	|

...

1	|[PR15890](https://github.com/apache/incubator-mxnet/pull/15890)	|

...


|numpy.degrees	|Converts angles from radians to degrees elementwise.	|

...

1	|	|

...


|numpy.radians	|Converts angles from degrees to radians elementwise.	|

...

1	|	|

...


|numpy.unwrap	|Unwrap by changing deltas between values to 2*pi complement.	|	|	|

...


|numpy.deg2rad	|Converts angles from degrees to radians elementwise.	|

...

1	|[PR16015](https://github.com/apache/incubator-mxnet/pull/16015)	|

...


|numpy.rad2deg	|Converts angles from radians to degrees elementwise.	|

...

1	|

...



### Hyperbolic functions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.sinh	|Elementwise hyperbolic sine function.	|

...

1	|	|

...


|numpy.cosh	|Elementwise hyperbolic cosine function.	|

...

1	|	|

...


|numpy.tanh	|Elementwise hyperbolic tangent function.	|

...

1	|	|

...


|numpy.arcsinh	|Elementwise inverse of hyperbolic sine function.	|

...

1	|	|

...


|numpy.arccosh	|Elementwise inverse of hyperbolic cosine function.	|

...

1	|	|

...


|numpy.arctanh	|Elementwise inverse of hyperbolic tangent function.	|

...

1	|	|

...



### Rounding

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.around	|Rounds to the given number of decimals.	|	|	|

...


|numpy.round_	|	|	|	|

...


|numpy.rint	|Rounds each element of an array to the nearest integer.	|

...

1	|	|

...


|numpy.fix	|If given value x is positive, it return floor(x).	|

...

1	|	|

...


|numpy.floor	|Rounds each element of an array to its floor integer.	|

...

1	|	|

...


|numpy.ceil	|Rounds each element of an array to its ceiling integer.	|

...

1	|	|

...


|numpy.trunc	|Rounds each element of an array towards zero.	|

...

1	|	|

...



### Sums, products, differences

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.prod	|Returns the product of an array along given axes.	|

...

1	|	|

...


|numpy.sum	|Returns the sum of an array along given axes.	|

...

1	|	|

...


|numpy.cumprod	|Returns the cumulative product of an array along a given axis.	|

...

1	|[PR15855](https://github.com/apache/incubator-mxnet/pull/15855)	|

...


|numpy.cumsum	|Returns the cumulative sum of an array along a given axis.	|

...

1	|[PR15309](https://github.com/apache/incubator-mxnet/pull/15309)	|

...


|numpy.diff	|Calculate the n-th discrete difference along the given axis.	|

...

1	|[PR15906](https://github.com/apache/incubator-mxnet/pull/15906)	|

...



### Exponents and logarithms

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|``numpy.exp``	|Elementwise exponential function.	|

...

1	|	|

...


|``numpy.expm1``	|Computes ``exp(x)` `-` `1`` elementwise.	|

...

1	|	|

...


|numpy.exp2	|Elementwise exponentiation with base 2.	|	|WIP sguangyo@	|

...


|numpy.log	|Elementwise natural logarithm function.	|

...

1	|	|

...


|numpy.log10	|Elementwise common logarithm function.	|

...

1	|	|

...


|numpy.log2	|Elementwise binary logarithm function.	|

...

1	|	|

...


|numpy.log1p	|Computes ``log(1` `+` `x)`` elementwise.	|

...

1	|	|

...


|numpy.logaddexp	|Computes ``log(exp(x1)` `+` `exp(x2))`` elementwise.	|

...

1	|	|

...


|numpy.logaddexp2	|Computes ``log2(exp2(x1)` `+` `exp2(x2))`` elementwise.	|

...

1	|	|

...



### Other special functions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.i0	|Modified Bessel function of the first kind, order 0.	|	|	|

...


|numpy.sinc	|Elementwise sinc function.	|	|	|

...



### Floating point routines

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.signbit	|Tests elementwise if the sign bit is set (i.e.	|	|	|

...


|numpy.copysign	|Returns the first argument with the sign bit of the second elementwise.	|	|	|

...


|numpy.frexp	|Decomposes each element to mantissa and two’s exponent.	|	|	|

...


|numpy.ldexp	|Computes ``x1` `*` `2` `**` `x2`` elementwise.	|	|	|

...


|numpy.nextafter	|Computes the nearest neighbor float values towards the second argument.	|	|	|

...



### Arithmetic operations

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.add	|Adds two arrays elementwise.	|

...

1	|	|

...


|numpy.reciprocal	|Computes ``1` `/` `x`` elementwise.	|

...

1	|	|

...


|numpy.negative	|Takes numerical negative elementwise.	|

...

1	|	|

...


|numpy.multiply	|Multiplies two arrays elementwise.	|

...

1	|	|

...


|numpy.divide	|Elementwise true division (i.e.	|

...

1	|	|

...


|numpy.power	|Computes ``x1` `**` `x2`` elementwise.	|

...

1	|	|

...


|numpy.subtract	|Subtracts arguments elementwise.	|

...

1	|	|

...


|numpy.true_divide	|Elementwise true division (i.e.	|

...

1	|	|

...


|numpy.floor_divide	|Elementwise floor division (i.e.	|

...

1	|	|

...


|numpy.fmod	|Computes the remainder of C division elementwise.	|	|	|

...


|numpy.mod	|Computes the remainder of Python division elementwise.	|

...

1	|	|

...


|numpy.modf	|Extracts the fractional and integral parts of an array elementwise.	|	|	|

...


|numpy.remainder	|Computes the remainder of Python division elementwise.	|

...

1	|	|

...


|numpy.divmod	|	|	|	|

...



### Handling complex numbers

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.angle	|Returns the angle of the complex argument.	|	|	|

...


|numpy.real	|Returns the real part of the elements of the array.	|	|	|

...


|numpy.imag	|Returns the imaginary part of the elements of the array.	|	|	|

...


|numpy.conj	|Returns the complex conjugate, element-wise.	|	|	|

...



### Miscellaneous

...



|op	|description	|finish	|note	|

...


|---	|---	|---	|---	|

...


|numpy.clip	|Clips the values of an array to a given interval.	|

...

1	|	|

...


|numpy.sqrt	|Elementwise square root function.	|

...

1	|	|

...


|numpy.cbrt	|Elementwise cube root function.	|

...

1	|	|

...


|numpy.square	|Elementwise square function.	|

...

1	|	|

...


|numpy.absolute	|Elementwise absolute value function.	|

...

1	|	|

...


|numpy.sign	|Elementwise sign function.	|

...

1	|	|

...


|numpy.maximum	|Takes the maximum of two arrays elementwise.	|

...

1	|	|

...


|numpy.minimum	|Takes the minimum of two arrays elementwise.	|

...

1	|	|

...


|numpy.fmax	|Takes the maximum of two arrays elementwise.	|	|WIP(tvm) guangtai@  #15800	|

...


|numpy.fmin	|Takes the minimum of two arrays elementwise.	|	|

...


|numpy.nan_to_num	|Elementwise nan_to_num function.	|	|	|

...


|numpy.blackman	|Returns the Blackman window.	|

...

1	|[PR15815](https://github.com/apache/incubator-mxnet/pull/15815)	|

...


|numpy.hamming	|Returns the Hamming window.	|

...

1	|

...


|numpy.hanning	|Returns the Hanning window.	|

...

1	|

...



## Padding

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.pad	|Returns padded array.	|	|	|

...



## Random Sampling (`**`numpy.random`**`)

...



The big difference of [``numpy.random

...


Unlike NumPy, CuPy allows itself to replace its random number generator across its major versions. It means that numbers generated by numpy.random of a new major version may not be the same as that of its previous one even if the same seed and distribution are used.

...




### Sample random data

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.random.rand	|Returns an array of uniform random values over the interval ``[0,` `1)``.	|	|	|

...


|numpy.random.randn	|Returns an array of standard normal random values.	|	|	|

...


|numpy.random.randint	|Returns a scalar or an array of integer values over ``[low,` `high)``.	|

...

1	|	|

...


|numpy.random.random_integers	|Return a scalar or an array of integer values over ``[low,` `high]``	|	|	|

...


|numpy.random.random_sample	|Returns an array of random values over the interval ``[0,` `1)``.	|	|	|

...


|numpy.random.random	|Returns an array of random values over the interval ``[0,` `1)``.	|	|	|

...


|numpy.random.ranf	|Returns an array of random values over the interval ``[0,` `1)``.	|	|	|

...


|numpy.random.sample	|Returns an array of random values over the interval ``[0,` `1)``.	|	|	|

...


|numpy.random.choice	|Returns an array of random values from a given 1-D array.	|

...

1	|	|

...


|numpy.random.bytes	|Returns random bytes.	|	|	|

...



### Distributions

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.random.beta	|Beta distribution.	|	|	|

...


|numpy.random.binomial	|Binomial distribution.	|	|	|

...


|numpy.random.chisquare	|Chi-square distribution.	|	|	|

...


|numpy.random.dirichlet	|Dirichlet distribution.	|	|	|

...


|numpy.random.exponential	|Exponential distribution.	|	|	|

...


|numpy.random.f	|F distribution.	|	|	|

...


|numpy.random.gamma	|Gamma distribution.	|

...

1	|	|

...


|numpy.random.geometric	|Geometric distribution.	|	|	|

...


|numpy.random.gumbel	|Returns an array of samples drawn from a Gumbel distribution.	|	|	|

...


|numpy.random.hypergeometric	|hypergeometric distribution.	|	|	|

...


|numpy.random.laplace	|Laplace distribution.	|	|	|

...


|numpy.random.logistic	|Logistic distribution.	|	|	|

...


|numpy.random.lognormal	|Returns an array of samples drawn from a log normal distribution.	|	|	|

...


|numpy.random.logseries	|Log series distribution.	|	|	|

...


|numpy.random.multinomial	|Returns an array from multinomial distribution.	|

...

1	|	|

...


|numpy.random.multivariate_normal	|(experimental) Multivariate normal distribution.	|	|	|

...


|numpy.random.negative_binomial	|Negative binomial distribution.	|	|	|

...


|numpy.random.noncentral_chisquare	|Noncentral chisquare distribution.	|	|	|

...


|numpy.random.noncentral_f	|Noncentral F distribution.	|	|	|

...


|numpy.random.normal	|Returns an array of normally distributed samples.	|

...

1	|	|

...


|numpy.random.pareto	|Pareto II or Lomax distribution.	|	|	|

...


|numpy.random.poisson	|Poisson distribution.	|	|	|

...


|numpy.random.power	|Power distribution.	|	|	|

...


|numpy.random.rayleigh	|Rayleigh distribution.	|	|	|

...


|numpy.random.standard_cauchy	|Standard cauchy distribution.	|	|	|

...


|numpy.random.standard_exponential	|Standard exponential distribution.	|	|	|

...


|numpy.random.standard_gamma	|Standard gamma distribution.	|	|	|

...


|numpy.random.standard_normal	|Returns an array of samples drawn from the standard normal distribution.	|	|	|

...


|numpy.random.standard_t	|Standard Student’s t distribution.	|	|	|

...


|numpy.random.triangular	|Triangular distribution.	|	|	|

...


|numpy.random.uniform	|Returns an array of uniformly-distributed samples over an interval.	|

...

1	|	|

...


|numpy.random.vonmises	|von Mises distribution.	|	|	|

...


|numpy.random.wald	|Wald distribution.	|	|	|

...


|numpy.random.weibull	|weibull distribution.	|	|	|

...


|numpy.random.zipf	|Zipf distribution.	|	|	|

...



### Random generator

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.random.RandomState	|Portable container of a pseudo-random number generator.	|	|	|

...


|numpy.random.seed	|Resets the state of the random number generator with a seed.	|	|	|

...


|numpy.random.get_random_state	|Gets the state of the random number generator for the current device.	|	|	|

...


|numpy.random.set_random_state	|Sets the state of the random number generator for the current device.	|	|	|

...



Note

...


CuPy does not provide ``numpy.random.get_state`` nor ``numpy.random.set_state`` at this time. Use [``numpy.random.get_random_state()

...




### Permutations

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.random.shuffle	|Shuffles an array.	|

...

1	|	|

...


|numpy.random.permutation	|Returns a permuted range or a permutation of an array.	|	|	|

...



## Sorting, Searching, and Counting

...



### Sorting

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.sort	|Returns a sorted copy of an array with a stable sorting algorithm.	|	|	|

...


|numpy.lexsort	|Perform an indirect sort using an array of keys.	|	|	|

...


|numpy.argsort	|Returns the indices that would sort an array with a stable sorting.	|

...

1	|	|

...


|numpy.msort	|Returns a copy of an array sorted along the first axis.	|	|	|

...


|numpy.partition	|Returns a partitioned copy of an array.	|	|	|

...


|numpy.argpartition	|Returns the indices that would partially sort an array.	|	|	|

...



See also

...


numpy.ndarray.sort()

...




### Searching

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.argmax	|Returns the indices of the maximum along an axis.	|

...

1	|	|

...


|numpy.argmin	|Returns the indices of the minimum along an axis.	|	|	|

...


|numpy.nonzero	|Return the indices of the elements that are non-zero.	|

...

1	|	|

...


|numpy.flatnonzero	|Return indices that are non-zero in the flattened version of a.	|	|	|

...


|numpy.where	|Return elements, either from x or y, depending on condition.	|	|	|

...



### Counting

...



|op	|description	|status	|note	|

...


|---	|---	|---	|---	|

...


|numpy.count_nonzero	|Counts the number of non-zero values in the array.	|	|	|