mxnet.numpyΒΆ

MXNet NumPy module.

Functions

abs(x[, out])

Calculate the absolute value element-wise.

absolute(x[, out])

Calculate the absolute value element-wise.

acos(x[, out])

Trigonometric inverse cosine, element-wise.

acosh(x[, out])

Inverse hyperbolic cosine, element-wise.

add(x1, x2[, out])

Add arguments element-wise.

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

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

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

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

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

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

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

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

append(arr, values[, axis])

Append values to the end of an array.

arange(start[, stop, step, dtype, device])

Return evenly spaced values within a given interval.

arccos(x[, out])

Trigonometric inverse cosine, element-wise.

arccosh(x[, out])

Inverse hyperbolic cosine, element-wise.

arcsin(x[, out])

Inverse sine, element-wise.

arcsinh(x[, out])

Inverse hyperbolic cosine, element-wise.

arctan(x[, out])

Trigonometric inverse tangent, element-wise.

arctan2(x1, x2[, out])

Element-wise arc tangent of x1/x2 choosing the quadrant correctly.

arctanh(x[, out])

Inverse hyperbolic tangent, element-wise.

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

Returns the indices of the maximum values along an axis.

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

Returns the indices of the minimum values along an axis.

argsort(a[, axis, descending, stable])

Returns the indices that sort an array x along a specified axis.

around(x[, decimals, out])

Evenly round to the given number of decimals.

array(object[, dtype, device])

Create an array.

array_split(ary, indices_or_sections[, axis])

Split an array into multiple sub-arrays.

asarray(obj[, dtype, device, copy])

Convert the input to an array.

asin(x[, out])

Inverse sine, element-wise.

asinh(x[, out])

Inverse hyperbolic cosine, element-wise.

atan(x[, out])

Trigonometric inverse tangent, element-wise.

atan2(x1, x2[, out])

Element-wise arc tangent of x1/x2 choosing the quadrant correctly.

atanh(x[, out])

Inverse hyperbolic tangent, element-wise.

atleast_1d(*arys)

Convert inputs to arrays with at least one dimension.

atleast_2d(*arys)

Convert inputs to arrays with at least two dimensions.

atleast_3d(*arys)

Convert inputs to arrays with at least three dimension.

average(a[, axis, weights, returned, out])

Compute the weighted average along the specified axis.

bincount(x[, weights, minlength])

Count number of occurrences of each value in array of non-negative ints.

bitwise_and(x1, x2[, out])

Compute the bit-wise XOR of two arrays element-wise.

bitwise_invert(x[, out])

Compute bit-wise inversion, or bit-wise NOT, element-wise.

bitwise_left_shift(x1, x2[, out])

Shift the bits of and integer to the left.

bitwise_not(x[, out])

Compute bit-wise inversion, or bit-wise NOT, element-wise.

bitwise_or(x1, x2[, out])

Compute the bit-wise OR of two arrays element-wise.

bitwise_right_shift(x1, x2[, out])

Shift the bits of and integer to the right.

bitwise_xor(x1, x2[, out])

Compute the bit-wise XOR of two arrays element-wise.

blackman(M[, dtype, device])

Return the Blackman window.

broadcast_to(array, shape)

Broadcast an array to a new shape.

cbrt(x[, out])

Return the cube-root of an array, element-wise.

ceil(x[, out])

Return the ceiling of the input, element-wise.

clip(a, a_min, a_max[, out])

Clip (limit) the values in an array.

column_stack(tup)

Stack 1-D arrays as columns into a 2-D array.

concat(seq[, axis, out])

Join a sequence of arrays along an existing axis.

concatenate(seq[, axis, out])

Join a sequence of arrays along an existing axis.

copy(a[, out])

Return an array copy of the given object.

copysign(x1, x2[, out])

Change the sign of x1 to that of x2, element-wise.

cos(x[, out])

Cosine, element-wise.

cosh(x[, out])

Hyperbolic cosine, element-wise.

cross(a, b[, axisa, axisb, axisc, axis])

Return the cross product of two (arrays of) vectors.

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

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

deg2rad(x[, out])

Convert angles from degrees to radians.

degrees(x[, out])

Convert angles from radians to degrees.

delete(arr, obj[, axis])

Return a new array with sub-arrays along an axis deleted.

diag(array[, k])

Extracts a diagonal or constructs a diagonal array.

diag_indices_from(arr)

This returns a tuple of indices that can be used to access the main diagonal of an array a with a.ndim >= 2 dimensions and shape (n, n, ..., n).

diagflat(array[, k])

Create a two-dimensional array with the flattened input as a diagonal.

diagonal(a[, offset, axis1, axis2])

If a is 2-D, returns the diagonal of a with the given offset, i.e., the collection of elements of the form a[i, i+offset].

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

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

divide(x1, x2[, out])

Returns a true division of the inputs, element-wise.

dot(a, b[, out])

Dot product of two arrays.

dsplit(ary, indices_or_sections)

Split array into multiple sub-arrays along the 3rd axis (depth).

dstack(arrays)

Stack arrays in sequence depth wise (along third axis).

ediff1d(ary[, to_end, to_begin])

The differences between consecutive elements of an array.

einsum(subscripts, *operands[, out, optimize])

Evaluates the Einstein summation convention on the operands.

empty(shape[, dtype, order, device])

Return a new array of given shape and type, without initializing entries.

empty_like(prototype[, dtype, device, ...])

Return a new array with the same shape and type as a given array.

equal(x1, x2[, out])

Return (x1 == x2) element-wise.

exp(x[, out])

Calculate the exponential of all elements in the input array.

expand_dims(a, axis)

Expand the shape of an array.

expm1(x[, out])

Calculate exp(x) - 1 for all elements in the array.

eye(N[, M, k, dtype, device])

Return a 2-D array with ones on the diagonal and zeros elsewhere.

fabs(x[, out])

Calculate the absolute value element-wise.

fill_diagonal(a, val[, wrap])

Fill the main diagonal of the given array of any dimensionality.

fix(x[, out])

Round an array of floats element-wise to nearest integer towards zero.

flatnonzero(a)

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

flip(m[, axis, out])

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

fliplr(*args, **kwargs)

Flip array in the left/right direction.

flipud(*args, **kwargs)

Flip array in the up/down direction.

floor(x[, out])

Return the floor of the input, element-wise.

floor_divide(x1, x2[, out])

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

fmax(x1, x2[, out])

Returns element-wise maximum of the input arrays with broadcasting.

fmin(x1, x2[, out])

Returns element-wise minimum of the input arrays with broadcasting.

fmod(x1, x2[, out])

Return element-wise remainder of division.

from_dlpack(x)

Returns a np.ndarray backed by a dlpack tensor.

full(shape, fill_value[, dtype, order, ...])

Return a new array of given shape and type, filled with fill_value.

full_like(a, fill_value[, dtype, order, ...])

Return a full array with the same shape and type as a given array.

gcd(x1, x2[, out])

Returns the greatest common divisor of |x1| and |x2|

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.

hamming(M[, dtype, device])

Return the hamming window.

hanning(M[, dtype, device])

Return the Hanning window.

histogram(a[, bins, range, normed, weights, ...])

Compute the histogram of a set of data.

hsplit(ary, indices_or_sections)

Split an array into multiple sub-arrays horizontally (column-wise).

hstack(arrays)

Stack arrays in sequence horizontally (column wise).

hypot(x1, x2[, out])

Given the "legs" of a right triangle, return its hypotenuse.

identity(n[, dtype, device])

Return the identity array.

indices(dimensions[, dtype, device])

Return an array representing the indices of a grid.

inner(a, b)

Inner product of two arrays.

insert(arr, obj, values[, axis])

Insert values along the given axis before the given indices.

interp(x, xp, fp[, left, right, period])

One-dimensional linear interpolation.

invert(x[, out])

Compute bit-wise inversion, or bit-wise NOT, element-wise.

isfinite(x[, out])

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

isinf(x[, out])

Test element-wise for positive or negative infinity.

isnan(x[, out])

Test element-wise for NaN and return result as a boolean array.

isneginf(x[, out])

Test element-wise for negative infinity, return result as bool array.

kron(a, b)

Kronecker product of two arrays.

lcm(x1, x2[, out])

Returns the lowest common multiple of |x1| and |x2|

ldexp(x1, x2[, out])

Returns x1 * 2**x2, element-wise.

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.

linspace(start, stop[, num, endpoint, ...])

Return evenly spaced numbers over a specified interval.

log(x[, out])

Natural logarithm, element-wise.

log10(x[, out])

Return the base 10 logarithm of the input array, element-wise.

log1p(x[, out])

Return the natural logarithm of one plus the input array, element-wise.

log2(x[, out])

Base-2 logarithm of x.

logaddexp(x1, x2[, out])

Logarithm of the sum of exponentiations of the inputs.

logical_and(x1, x2[, out])

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

logical_not(x[, out])

Compute the truth value of NOT x element-wise.

logical_or(x1, x2[, out])

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

logical_xor(x1, x2[, out])

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

logspace(start, stop[, num, endpoint, base, ...])

Return numbers spaced evenly on a log scale.

matmul(a, b[, out])

Matrix product of two arrays.

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

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

maximum(x1, x2[, out])

Returns element-wise maximum of the input arrays with broadcasting.

may_share_memory(a, b[, max_work])

Determine if two arrays might share memory

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

Compute the arithmetic mean along the specified axis.

median(a[, axis, out, overwrite_input, keepdims])

Compute the median along the specified axis.

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

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

minimum(x1, x2[, out])

Returns element-wise minimum of the input arrays with broadcasting.

mod(x1, x2[, out])

Return element-wise remainder of division.

moveaxis(a, source, destination)

Move axes of an array to new positions.

multiply(x1, x2[, out])

Multiply arguments element-wise.

nan_to_num(x[, copy, nan, posinf, neginf])

Replace NaN with zero and infinity with large finite numbers (default behaviour) or with the numbers defined by the user using the nan, posinf and/or neginf keywords.

negative(x[, out])

Numerical negative, element-wise.

nonzero(a)

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

not_equal(x1, x2[, out])

Return (x1 != x2) element-wise.

ones(shape[, dtype, order, device])

Return a new array of given shape and type, filled with ones.

ones_like(a[, dtype, order, device, out])

Return an array of ones with the same shape and type as a given array.

outer(a, b)

Compute the outer product of two vectors.

pad(x[, pad_width, mode])

Pad an array.

percentile(a, q[, axis, out, ...])

Compute the q-th percentile of the data along the specified axis.

permute_dims(a[, axes])

Permute the dimensions of an array.

polyval(p, x)

Evaluate a polynomial at specific values.

positive(x[, out])

Computes the numerical positive of each element x_i (i.e.,`y_i = +x_i`) of the input array x .

pow(x1, x2[, out])

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

power(x1, x2[, out])

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

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

Return the product of array elements over a given axis.

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

Return the product of array elements over a given axis.

quantile(a, q[, axis, out, overwrite_input, ...])

Compute the q-th quantile of the data along the specified axis.

rad2deg(x[, out])

Convert angles from radians to degrees.

radians(x[, out])

Convert angles from degrees to radians.

ravel(x)

Return a contiguous flattened array.

reciprocal(x[, out])

Return the reciprocal of the argument, element-wise.

remainder(x1, x2[, out])

Return element-wise remainder of division.

repeat(a, repeats[, axis])

Repeat elements of an array.

reshape(a, newshape[, order, out])

Gives a new shape to an array without changing its data.

resize(a, new_shape)

Return a new array with the specified shape.

rint(x[, out])

Round elements of the array to the nearest integer.

roll(a, shift[, axis])

Roll array elements along a given axis.

rollaxis(a, axis[, start])

Roll the specified axis backwards, until it lies in a given position.

rot90(m[, k, axes])

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

round(a[, decimals, out])

Round an array to the given number of decimals.

round_(a[, decimals, out])

Round an array to the given number of decimals.

row_stack(arrays)

Stack arrays in sequence vertically (row wise).

set_printoptions([precision, threshold])

Set printing options.

shape(a)

Return the shape of an array.

shares_memory(a, b[, max_work])

Determine if two arrays share memory

sign(x[, out])

Returns an element-wise indication of the sign of a number.

sin(x[, out])

Trigonometric sine, element-wise.

sinh(x[, out])

Hyperbolic sine, element-wise.

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

Check whether some values are true.

sort(a[, axis, descending, stable])

Return a sorted copy of an array.

split(ary, indices_or_sections[, axis])

Split an array into multiple sub-arrays.

sqrt(x[, out])

Return the non-negative square-root of an array, element-wise.

square(x[, out])

Return the element-wise square of the input.

squeeze(a[, axis, out])

Remove single-dimensional entries from the shape of an array.

stack(arrays[, axis, out])

Join a sequence of arrays along a new axis.

std(a[, axis, dtype, out, correction, keepdims])

Compute the standard deviation along the specified axis.

subtract(x1, x2[, out])

Subtract arguments element-wise.

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

Sum of array elements over a given axis.

swapaxes(a, axis1, axis2)

Interchange two axes of an array.

take(a, indices[, axis, mode, out])

Take elements from an array along an axis.

tan(x[, out])

Compute tangent element-wise.

tanh(x[, out])

Compute hyperbolic tangent element-wise.

tensordot(a, b[, axes])

Compute tensor dot product along specified axes for arrays >= 1-D.

tile(A, reps)

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

trace(a[, offset, axis1, axis2, out])

Return the sum along diagonals of the array.

transpose(a[, axes])

Permute the dimensions of an array.

tri(N[, M, k, dtype, device])

An array with ones at and below the given diagonal and zeros elsewhere.

tril(m[, k])

Lower triangle of an array.

tril_indices(n[, k, m])

Return the indices for the lower-triangle of an (n, m) array.

triu(m[, k])

Upper triangle of an array.

triu_indices(n[, k, m, device])

Return the indices for the upper-triangle of an (n, m) array.

triu_indices_from(arr[, k])

Return the indices for the upper-triangle of arr.

true_divide(x1, x2[, out])

Returns a true division of the inputs, element-wise.

trunc(x[, out])

Return the truncated value of the input, element-wise.

unique(ar[, return_index, return_inverse, ...])

Find the unique elements of an array.

unravel_index(indices, shape[, order])

Converts a flat index or array of flat indices into a tuple of coordinate arrays.

var(a[, axis, dtype, out, correction, keepdims])

Compute the variance along the specified axis.

vdot(a, b)

Return the dot product of two vectors.

vsplit(ary, indices_or_sections)

Split an array into multiple sub-arrays vertically (row-wise).

vstack(arrays[, out])

Stack arrays in sequence vertically (row wise).

where(condition, [x, y])

Return elements chosen from x or y depending on condition.

zeros(shape[, dtype, order, device])

Return a new array of given shape and type, filled with zeros.

zeros_like(a[, dtype, order, device, out])

Return an array of zeros with the same shape and type as a given array.

Classes

ndarray

ndarray(handle, writable=True):

Modules

arrayprint

ndarray print format controller.

fallback

Operators that fallback to official NumPy implementation.

fallback_linalg

Operators that fallback to official NumPy implementation for np.linalg.

function_base

Numpy basic functions.

io

I/O functions for ndarrays.

linalg

Namespace for ops used in imperative programming.

multiarray

numpy ndarray and util functions.

random

Namespace for ops used in imperative programming.

set_functions

Standard Array API for creating and operating on sets.

stride_tricks

Util functions with broadcast.

type_functions

Type functions for the numpy module.

utils

Util functions for the numpy module.