anastruct.basic
Exceptions
Common base class for all non-exit exceptions. |
Functions
|
Find the nearest value in an array |
|
Integrate an array y*dx using the trapezoidal rule |
|
Convert an argument to a list of length n |
|
Create a 2x2 rotation matrix |
|
Rotate a 2D matrix around the origin |
Module Contents
- anastruct.basic.find_nearest(array: numpy.ndarray, value: float) Tuple[float, int][source]
Find the nearest value in an array
- Args:
array (np.ndarray): array to search within value (float): value to search for
- Returns:
Tuple[float, int]: Nearest value, index
- anastruct.basic.integrate_array(y: numpy.ndarray, dx: float) numpy.ndarray[source]
Integrate an array y*dx using the trapezoidal rule
- Args:
y (np.ndarray): Array to integrate dx (float): Step size
- Returns:
np.ndarray: Integrated array
- exception anastruct.basic.FEMException(type_: str, message: str)[source]
Bases:
ExceptionCommon base class for all non-exit exceptions.
- anastruct.basic.arg_to_list(arg: Any, n: int) list[source]
Convert an argument to a list of length n
- Args:
arg (Any): Argument to convert n (int): Length of list to create
- Returns:
list: List of length n