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 base-2 logarithm of the components of the dependent variables. |
|
Calculate base-10 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 element-wise reciprocal. |
|
Return element-wise numerical positive. |
|
Return element-wise numerical negative. |
Functions |
Description |
---|---|
Return element-wise non-negative square-root. |
|
Return element-wise cube-root. |
|
Return element-wise square. |
|
Return element-wise absolute value. |
|
Return element-wise absolute value. |
|
Return element-wise sign of the values. |
Functions |
Description |
---|---|
Return element-wise angle of a complex value. |
|
Return element-wise real part of a complex value. |
|
Return element-wise imaginary part of a complex value.å |
|
Return element-wise conjugate. |
|
Return element-wise 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