USEncrypt® + NumPy#

Per NumPy’s documentation, NumPy is the “fundamental package for scientific computing in Python. It is a Python library that provides a multidimensional array object, various derived objects (such as masked arrays and matrices), and an assortment of routines for fast operations on arrays, including mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete Fourier transforms, basic linear algebra, basic statistical operations, random simulation and much more.”

The USEncrypt® library has overloaded support for many of NumPy’s most important functions. The table below contains an updated list of NumPy functions with USEncrypt® support.

Function

Use

numpy.add

Computes the element-wise sum of two values.

numpy.average

Computes the weighted average of an array.

numpy.cos

Computes the element-wise cosine.

numpy.cross

Computes the cross product of two vectors.

numpy.cumsum

Computes the cumulative sum of array elements.

numpy.divide

Computes the element-wise quotient of two arrays.

numpy.dot

Computes the dot product of two arrays.

numpy.exp

Computes the exponential of all element in the array.

numpy.inner

Computes the inner product of two arrays.

numpy.kron

Computes the Kronecker product of two arrays.

numpy.linalg.matrix_power

Raises a square matrix to the (integer) power \(n\).

numpy.linalg.norm

Computes a matrix’s or vector’s norm.

numpy.log

Computes the element-wise natural logarithm.

numpy.matmul

Computes the matrix product of two arrays.

numpy.maximum

Compares two arrays and returns the element-wise maxima.

numpy.mean

Computes the arithmetic mean of an array.

numpy.median

Computes the median of an array.

numpy.minimum

Compares two arrays and returns the element-wise maxima.

numpy.multiply

Computes the element-wise product of two arrays.

numpy.outer

Computes the outer product of two vectors.

numpy.partition

Returns a partitioned copy of an array.

numpy.prod

Computes the product of the elements of an array.

numpy.sin

Computes the element-wise sine.

numpy.sqrt

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

numpy.std

Computes the standard deviation of an array.

numpy.subtract

Computes the element-wise difference of two arrays.

numpy.sum

Computes the sum of array elements.

numpy.tensordot

Computes the tensor dot product of two arrays.

numpy.trace

Computes the sum along diagonals of an array.

Further, we are constantly working on adding support for more NumPy functions in the future.