Supported NumPy functions¶
The csdm object supports the use of NumPy functions, as
>>> y = np.func(x)
where x
and y
are the csdm objects, and func
is any one of the
following functions. These functions apply to each component of the dependent
variables from a given csdm object, x.
Trigonometric functions
The trigonometric functions apply to the components of the dependent variables from a csdm object.
Note
The components must be dimensionless quantities.
Functions 
Description 

Apply sine to the components of the dependent variables 

Apply cosine to the components of the dependent variables 

Apply tangent to the components of the dependent variables 

Apply inverse sine to the components of the dependent variables 

Apply inverse cosine to the components of the dependent variables 

Apply inverse tangent to the components of the dependent variables 

Apply hyperbolic sine to the components of the dependent variables 

Apply hyperbolic cosine to the components of the dependent variables 

Apply hyperbolic tangent to the components of the dependent variables 

Apply inverse hyperbolic sine to the components of the dependent variables 

Apply inverse hyperbolic cosine to the components of the dependent variables 

Apply inverse hyperbolic tangent to the components of the dependent variables 
Mathematical operations
The following mathematical functions apply to the components of the dependent variables from a csdm object.
Note
The components must be dimensionless quantities.
Functions 
Description 

Calculate the exponential of the components of the dependent variables. 

Apply \(e^x  1\), where x are the components of the dependent variables. 

Calculate \(2^x\), where x are the components of the dependent variables. 

Calculate natural logarithm of the components of the dependent variables. 

Calculate natural logarithm plus one on the components of the dependent variables. 

Calculate base2 logarithm of the components of the dependent variables. 

Calculate base10 logarithm of the components of the dependent variables. 
The following mathematical functions apply to the components of the dependent variables from a csdm object irrespective of the components’ dimensionality.
Functions 
Description 

Return elementwise reciprocal. 

Return elementwise numerical positive. 

Return elementwise numerical negative. 
Functions 
Description 

Return elementwise nonnegative squareroot. 

Return elementwise cuberoot. 

Return elementwise square. 

Return elementwise absolute value. 

Return elementwise absolute value. 

Return elementwise sign of the values. 
Functions 
Description 

Return elementwise angle of a complex value. 

Return elementwise real part of a complex value. 

Return elementwise imaginary part of a complex value.å 

Return elementwise conjugate. 

Return elementwise conjugate. 
Functions 
Description 

Return the product of the components of a dependent variable along a dimension. 

Return the sum of the components of a dependent variable along a dimension. 
Functions 
Description 

Round elements to the nearest integer. 

Round elements to the given number of decimals. 

Round elements to the given number of decimals. 
Other functions
min
max
mean
var
std