API
Collection of complex-step safe functions to replace standard Numpy operations. Parts are adapted from https://github.com/OpenMDAO/OpenMDAO/blob/master/openmdao/utils/cs_safe.py
- complexify.cs.abs(x)[source]
complex-step safe version of numpy.abs function.
- Parameters:
- xndarray
array value to be computed on
- Returns:
- ndarray
- complexify.cs.arctan2(y, x)[source]
Numpy-compatible, complex-compatible arctan2 function for use with complex-step.
- Parameters:
- yfloat or complex
The length of the side opposite the angle being determined.
- xfloat or complex
The length of the side adjacent to the angle being determined.
- Returns:
- ndarray
The angle whose opposite side has length y and whose adjacent side has length x.
- complexify.cs.mean_std(x)[source]
A function to compute mean and standard deviation of a numpy array.
- Parameters:
- xndarray
The array of sampled values
- Returns:
- mean
The mean value of the input array
- stdev
The standard deviation of the input array