Mathematics

Arithmetics

add(x1, x2[, out, where])

Add arguments element-wise.

inner(a, b)

Inner product of two arrays.

matmul(x1, x2[, out])

Matrix product of two arrays.

multiply(x1, x2[, out, where])

Multiply arguments element-wise.

negative(x[, out, where])

Numerical negative, element-wise.

outer(a, b[, out])

Compute the outer product of two vectors.

positive(x[, out, where])

Numerical positive, element-wise.

power(x1, x2, **kwargs)

First array elements raised to powers from second array, element-wise.

subtract(x1, x2[, out, where])

Subtract arguments, element-wise.

square(x[, out, where])

Return the element-wise square of the input.

Division

divide(x1, x2[, out, where])

Return true division of the inputs, element-wise.

divmod(x1, x2[, out, where])

Return element-wise quotient and remainder simultaneously.

floor_divide(x1, x2[, out, where])

Return the largest integer smaller or equal to the division of the inputs.

mod(x1, x2[, out, where])

Return element-wise remainder of numerical division.

poly_divide(x1, x2[, out, where])

Return a polynomial division of the inputs, element-wise.

poly_divmod(dividend, divisor[, out, where])

Return element-wise quotient and remainder simultaneously.

poly_remainder(x1, x2[, out, where])

Return element-wise remainder of polynomial division.

remainder(x1, x2[, out, where])

Return element-wise remainder of numerical division.

true_divide(x1, x2[, out, where])

Return true division of the inputs, element-wise.

Logic

any(a[, axis, out, keepdims])

Test whether any array element along a given axis evaluates to True.

all(a[, axis, out, keepdims])

Test whether all array elements along a given axis evaluate to True.

allclose(a, b[, rtol, atol, equal_nan])

Return True if two arrays are element-wise equal within a tolerance.

equal(x1, x2[, out, where])

Return (x1 == x2) element-wise.

greater(x1, x2[, out])

Return the truth value of (x1 > x2) element-wise.

greater_equal(x1, x2[, out])

Return the truth value of (x1 >= x2) element-wise.

isclose(a, b[, rtol, atol, equal_nan])

Return true where two arrays are element-wise equal within a tolerance.

isfinite(x[, out, where])

Test element-wise for finiteness (not infinity or not Not a Number).

less(x1, x2[, out])

Return the truth value of (x1 < x2) element-wise.

less_equal(x1, x2[, out])

Return the truth value of (x1 <= x2) element-wise.

logical_and(x1, x2[, out, where])

Compute the truth value of x1 AND x2 element-wise.

logical_or(x1, x2[, out, where])

Compute the truth value of x1 OR x2 element-wise.

not_equal(x1, x2[, out, where])

Return (x1 != x2) element-wise.

Rounding

abs(x[, out, where])

Calculate the absolute value element-wise.

absolute(x[, out, where])

Calculate the absolute value element-wise.

around(a[, decimals, out])

Evenly round to the given number of decimals.

ceil(q0[, out, where])

Return the ceiling of the input, element-wise.

floor(x[, out, where])

Return the floor of the input, element-wise.

rint(x[, out, where])

Round elements of the array to the nearest integer.

round(a[, decimals, out])

Evenly round to the given number of decimals.

round_(a[, decimals, out])

Evenly round to the given number of decimals.

Sums/Products

cumsum(a[, axis, dtype, out])

Return the cumulative sum of the elements along a given axis.

det(a)

Compute the determinant of an polynomial array.

mean(a[, axis, dtype, out])

Compute the arithmetic mean along the specified axis.

prod(a[, axis, dtype, out, keepdims])

Return the product of array elements over a given axis.

sum(a[, axis, dtype, out, keepdims])

Sum of array elements over a given axis.

Differentiation

derivative(poly, *diffvars)

Polynomial differential operator.

diff(a[, n, axis, prepend, append])

Calculate the n-th discrete difference along the given axis.

ediff1d(ary[, to_end, to_begin])

Difference between consecutive elements of an array.

gradient(poly)

Polynomial gradient operator.

hessian(poly)

Construct Hessian matrix of polynomials.

Min/Max

amax(a[, axis, out])

Return the maximum of an array or maximum along an axis.

amin(a[, axis, out])

Return the minimum of an array or minimum along an axis.

argmin(a[, axis, out])

Return the indices of the minimum values along an axis.

argmax(a[, axis, out])

Return the indices of the maximum values along an axis.

max(a[, axis, out])

Return the maximum of an array or maximum along an axis.

maximum(x1, x2[, out])

Element-wise maximum of array elements.

min(a[, axis, out])

Return the minimum of an array or minimum along an axis.

minimum(x1, x2[, out])

Element-wise minimum of array elements.

Conditionals

choose(a, choices[, out, mode])

Construct array from an index array and a set of arrays to choose from.

count_nonzero(x[, axis])

Count the number of non-zero values in the array a.

nonzero(x, **kwargs)

Return the indices of the elements that are non-zero.

where(condition, *args)

Return elements chosen from x or y depending on condition.