You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


## Universal Functions (ufunc)

### Math operations

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.add |Adds two arrays elementwise. | Done| |
|numpy.subtract |Subtracts arguments elementwise. | Done| |
|numpy.multiply |Multiplies two arrays elementwise. | Done| |
|numpy.divide |Elementwise true division (i.e. | Done| |
|numpy.logaddexp |Computes ``log(exp(x1)` `+` `exp(x2))`` elementwise. | Done|[PR15495](https://github.com/apache/incubator-mxnet/pull/15495) |
|numpy.logaddexp2 |Computes ``log2(exp2(x1)` `+` `exp2(x2))`` elementwise. | Done|[PR15494](https://github.com/apache/incubator-mxnet/pull/15494) |
|numpy.true_divide |Elementwise true division (i.e. | Done|Need a frontend interface called np.true_divide |
|numpy.floor_divide |Elementwise floor division (i.e. | Done| |
|numpy.negative |Takes numerical negative elementwise. | Done| |
|numpy.power |Computes ``x1` `**` `x2`` elementwise. | Done| |
|numpy.remainder |Computes the remainder of Python division elementwise. | Done|[PR16080](https://github.com/apache/incubator-mxnet/pull/16080) |
|numpy.mod |Computes the remainder of Python division elementwise. | Done| |
|numpy.fmod |Computes the remainder of C division elementwise. | | |
|numpy.absolute |Elementwise absolute value function. | Done|abs |
|numpy.rint |Rounds each element of an array to the nearest integer. | Done| |
|numpy.sign |Elementwise sign function. | Done| |
|numpy.exp |Elementwise exponential function. | Done| |
|numpy.exp2 |Elementwise exponentiation with base 2. | Done|[PR15973](https://github.com/apache/incubator-mxnet/pull/15973) |
|numpy.log |Elementwise natural logarithm function. | Done| |
|numpy.log2 |Elementwise binary logarithm function. | Done| |
|numpy.log10 |Elementwise common logarithm function. | Done| |
|numpy.expm1 |Computes ``exp(x)` `-` `1`` elementwise. | Done| |
|numpy.log1p |Computes ``log(1` `+` `x)`` elementwise. | Done| |
|numpy.sqrt |Elementwise square root function. | Done| |
|numpy.square |Elementwise square function. | Done| |
|numpy.reciprocal |Computes ``1` `/` `x`` elementwise. | Done| |

### Trigonometric functions

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.sin |Elementwise sine function. | Done| |
|numpy.cos |Elementwise cosine function. | Done| |
|numpy.tan |Elementwise tangent function. | Done| |
|numpy.arcsin |Elementwise inverse-sine function (a.k.a. | Done| |
|numpy.arccos |Elementwise inverse-cosine function (a.k.a. | Done| |
|numpy.arctan |Elementwise inverse-tangent function (a.k.a. | Done| |
|numpy.arctan2 |Elementwise inverse-tangent of the ratio of two arrays. | Done|[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. | Done| |
|numpy.cosh |Elementwise hyperbolic cosine function. | Done| |
|numpy.tanh |Elementwise hyperbolic tangent function. | Done| |
|numpy.arcsinh |Elementwise inverse of hyperbolic sine function. | Done| |
|numpy.arccosh |Elementwise inverse of hyperbolic cosine function. | Done| |
|numpy.arctanh |Elementwise inverse of hyperbolic tangent function. | Done| |
|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``. | Done|https://github.com/apache/incubator-mxnet/pull/15940 |
|numpy.greater_equal |Tests elementwise if ``x1` `>=` `x2``. | Done|
|numpy.less |Tests elementwise if ``x1` `<` `x2``. | Done|
|numpy.less_equal |Tests elementwise if ``x1` `<=` `x2``. | Done|
|numpy.not_equal |Tests elementwise if ``x1` `!=` `x2``. | Done|
|numpy.equal |Tests elementwise if ``x1` `==` `x2``. | Done|
|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. | Done| |
|numpy.maximum |Takes the maximum of two arrays elementwise. | Done| |
|numpy.minimum |Takes the minimum of two arrays elementwise. | Done| |
|numpy.fmax |Takes the maximum of two arrays elementwise. | Done|WIP(tvm) guangtai@ #15800 |
|numpy.fmin |Takes the minimum of two arrays elementwise. | Done|

### 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. | Done| |
|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. | Done| |
|numpy.ceil |Rounds each element of an array to its ceiling integer. | Done| |
|numpy.trunc |Rounds each element of an array towards zero. | Done| |

## [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. | Done| |
|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. | Done| |
|numpy.identity |Returns a 2-D identity array. | Done|[PR15698](https://github.com/apache/incubator-mxnet/pull/15698) |
|numpy.ones |Returns a new array of given shape and dtype, filled with ones. | Done| |
|numpy.ones_like |Returns an array of ones with same shape and dtype as a given array. | Done| |
|numpy.zeros |Returns a new array of given shape and dtype, filled with zeros. | Done| |
|numpy.zeros_like |Returns an array of zeros with same shape and dtype as a given array. | Done| |
|numpy.full |Returns a new array of given shape and dtype, filled with a given value. | Done|[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. | Done| |
|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. | Done| |

### Numerical ranges

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.arange |Returns an array with evenly spaced values within a given interval. | Done| |
|numpy.linspace |Returns an array with evenly-spaced values within a given interval. | Done| |
|numpy.logspace |Returns an array with evenly-spaced values on a log-scale. | Done|[PR15825](https://github.com/apache/incubator-mxnet/pull/15825) |
|numpy.meshgrid |Return coordinate matrices from coordinate vectors. | Done| |
|numpy.mgrid |Construct a multi-dimensional “meshgrid”. | Done|[PR15562](https://github.com/apache/incubator-mxnet/pull/15562) |
|numpy.ogrid |Construct a multi-dimensional “meshgrid”. | Done|[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. | Done|[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. | Done|only convenient mode |

### Changing array shape

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.reshape |Returns an array with new shape and same elements. | Done| |
|numpy.ravel |Returns a flattened array. | | |

### Transpose-like operations

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.moveaxis |Moves axes of an array to new positions. | Done| [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. | Done| |
|numpy.transpose |Permutes the dimensions of an array. | Done| |

### 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. | Done| |
|numpy.broadcast_arrays |Broadcasts given arrays. | Done| |
|numpy.expand_dims |Expands given arrays. | Done| |
|numpy.squeeze |Removes size-one axes from the shape of an array. | Done| |

### 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. | Done| |
|numpy.stack |Stacks arrays along a new axis. | Done| |
|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. | Done|[PR15314](https://github.com/apache/incubator-mxnet/pull/15314) |
|numpy.hstack |Stacks arrays horizontally. | Done|PR15302 |
|numpy.vstack |Stacks arrays vertically. | Done|PR15325 |

### Splitting arrays

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.split |Splits an array into multiple sub arrays along a given axis. | Done| |
|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. | Done|[PR15371](https://github.com/apache/incubator-mxnet/pull/15371) |
|numpy.hsplit |Splits an array into multiple sub arrays horizontally. | Done|[PR15358](https://github.com/apache/incubator-mxnet/pull/15358) |
|numpy.vsplit |Splits an array into multiple sub arrays along the first axis. | Done|[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. | Done| |
|numpy.repeat |Repeat arrays along an axis. | Done| |

### Adding and removing elements

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.unique |Find the unique elements of an array. | Done|[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. | Done|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. | Done| |
|numpy.roll |Roll array elements along a given axis. | Done|[PR15902](https://github.com/apache/incubator-mxnet/pull/15902) |
|numpy.rot90 |Rotate an array by 90 degrees in the plane specified by axes. | Done|[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. | Done| |
|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. | Done| |
|numpy.save |Saves an array to a binary file in ``.npy`` format. | Done| |
|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. | Done| |
|numpy.vdot |Returns the dot product of two vectors. | Done|PR in progress |
|numpy.inner |Returns the inner product of two arrays. | Done|PR in progress |
|numpy.outer |Returns the outer product of two vectors. | Done|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. | Done|[PR15349](https://github.com/apache/incubator-mxnet/pull/15349) |
|numpy.einsum |Evaluates the Einstein summation convention on the operands. | Done|[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. | Done|[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. | Done| |
|numpy.linalg.norm |Returns one of matrix norms specified by ``ord`` parameter. | Done| |
|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. | Done| |
|numpy.trace |Returns the sum along the diagonals of an array. | Done|[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. | Done| |
|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``. | Done|Re-implement to return boolean ndarray |
|numpy.greater_equal |Tests elementwise if ``x1` `>=` `x2``. | Done|
|numpy.less |Tests elementwise if ``x1` `<` `x2``. | Done|
|numpy.less_equal |Tests elementwise if ``x1` `<=` `x2``. | Done|
|numpy.equal |Tests elementwise if ``x1` `==` `x2``. | Done|
|numpy.not_equal |Tests elementwise if ``x1` `!=` `x2``. | Done|

## Mathematical Functions

### Trigonometric functions

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.sin |Elementwise sine function. | Done| |
|numpy.cos |Elementwise cosine function. | Done| |
|numpy.tan |Elementwise tangent function. | Done| |
|numpy.arcsin |Elementwise inverse-sine function (a.k.a. | Done| |
|numpy.arccos |Elementwise inverse-cosine function (a.k.a. | Done| |
|numpy.arctan |Elementwise inverse-tangent function (a.k.a. | Done| |
|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. | Done|[PR15890](https://github.com/apache/incubator-mxnet/pull/15890) |
|numpy.degrees |Converts angles from radians to degrees elementwise. | Done| |
|numpy.radians |Converts angles from degrees to radians elementwise. | Done| |
|numpy.unwrap |Unwrap by changing deltas between values to 2*pi complement. | | |
|numpy.deg2rad |Converts angles from degrees to radians elementwise. | Done|[PR16015](https://github.com/apache/incubator-mxnet/pull/16015) |
|numpy.rad2deg |Converts angles from radians to degrees elementwise. | Done|

### Hyperbolic functions

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.sinh |Elementwise hyperbolic sine function. | Done| |
|numpy.cosh |Elementwise hyperbolic cosine function. | Done| |
|numpy.tanh |Elementwise hyperbolic tangent function. | Done| |
|numpy.arcsinh |Elementwise inverse of hyperbolic sine function. | Done| |
|numpy.arccosh |Elementwise inverse of hyperbolic cosine function. | Done| |
|numpy.arctanh |Elementwise inverse of hyperbolic tangent function. | Done| |

### 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. | Done| |
|numpy.fix |If given value x is positive, it return floor(x). | Done| |
|numpy.floor |Rounds each element of an array to its floor integer. | Done| |
|numpy.ceil |Rounds each element of an array to its ceiling integer. | Done| |
|numpy.trunc |Rounds each element of an array towards zero. | Done| |

### Sums, products, differences

|op |description |status |note |
|--- |--- |--- |--- |
|numpy.prod |Returns the product of an array along given axes. | Done| |
|numpy.sum |Returns the sum of an array along given axes. | Done| |
|numpy.cumprod |Returns the cumulative product of an array along a given axis. | Done|[PR15855](https://github.com/apache/incubator-mxnet/pull/15855) |
|numpy.cumsum |Returns the cumulative sum of an array along a given axis. | Done|[PR15309](https://github.com/apache/incubator-mxnet/pull/15309) |
|numpy.diff |Calculate the n-th discrete difference along the given axis. | Done|[PR15906](https://github.com/apache/incubator-mxnet/pull/15906) |

### Exponents and logarithms

|op |description |status |note |
|--- |--- |--- |--- |
|``numpy.exp`` |Elementwise exponential function. | Done| |
|``numpy.expm1`` |Computes ``exp(x)` `-` `1`` elementwise. | Done| |
|numpy.exp2 |Elementwise exponentiation with base 2. | |WIP sguangyo@ |
|numpy.log |Elementwise natural logarithm function. | Done| |
|numpy.log10 |Elementwise common logarithm function. | Done| |
|numpy.log2 |Elementwise binary logarithm function. | Done| |
|numpy.log1p |Computes ``log(1` `+` `x)`` elementwise. | Done| |
|numpy.logaddexp |Computes ``log(exp(x1)` `+` `exp(x2))`` elementwise. | Done| |
|numpy.logaddexp2 |Computes ``log2(exp2(x1)` `+` `exp2(x2))`` elementwise. | Done| |

### 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. | Done| |
|numpy.reciprocal |Computes ``1` `/` `x`` elementwise. | Done| |
|numpy.negative |Takes numerical negative elementwise. | Done| |
|numpy.multiply |Multiplies two arrays elementwise. | Done| |
|numpy.divide |Elementwise true division (i.e. | Done| |
|numpy.power |Computes ``x1` `**` `x2`` elementwise. | Done| |
|numpy.subtract |Subtracts arguments elementwise. | Done| |
|numpy.true_divide |Elementwise true division (i.e. | Done| |
|numpy.floor_divide |Elementwise floor division (i.e. | Done| |
|numpy.fmod |Computes the remainder of C division elementwise. | | |
|numpy.mod |Computes the remainder of Python division elementwise. | Done| |
|numpy.modf |Extracts the fractional and integral parts of an array elementwise. | | |
|numpy.remainder |Computes the remainder of Python division elementwise. | Done| |
|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. | Done| |
|numpy.sqrt |Elementwise square root function. | Done| |
|numpy.cbrt |Elementwise cube root function. | Done| |
|numpy.square |Elementwise square function. | Done| |
|numpy.absolute |Elementwise absolute value function. | Done| |
|numpy.sign |Elementwise sign function. | Done| |
|numpy.maximum |Takes the maximum of two arrays elementwise. | Done| |
|numpy.minimum |Takes the minimum of two arrays elementwise. | Done| |
|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. | Done|[PR15815](https://github.com/apache/incubator-mxnet/pull/15815) |
|numpy.hamming |Returns the Hamming window. | Done|
|numpy.hanning |Returns the Hanning window. | Done|

## 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)``. | Done| |
|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. | Done| |
|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. | Done| |
|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. | Done| |
|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. | Done| |
|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. | Done| |
|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. | Done| |
|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. | Done| |
|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. | Done| |
|numpy.argmin |Returns the indices of the minimum along an axis. | | |
|numpy.nonzero |Return the indices of the elements that are non-zero. | Done| |
|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. | | |



  • No labels