aragog.utilities
utilities
Utilities
FloatOrArray = float | npt.NDArray
module-attribute
MultiplyT = TypeVar('MultiplyT', float, npt.NDArray, pd.Series, pd.DataFrame)
module-attribute
combine_properties(weight, property1, property2)
Linear weighting of two quantities.
Args: weight: The weight to apply to property1 property1: The value of the first property property2: The value of the second property
Returns: The combined (weighted) property
Source code in aragog/utilities.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
is_file(value)
Checks if value is a file.
Args: value: Object to be checked
Returns: True if the value is a file, otherwise False
Source code in aragog/utilities.py
50 51 52 53 54 55 56 57 58 59 60 61 62 | |
is_monotonic_increasing(some_array)
Returns True if an array is monotonically increasing, otherwise returns False.
Source code in aragog/utilities.py
65 66 67 | |
is_number(value)
Checks if value is a number.
Args: value: Object to be checked
Returns: True if the value is a number, otherwise False
Source code in aragog/utilities.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
profile_decorator(func)
Decorator to profile a function
Source code in aragog/utilities.py
36 37 38 39 40 41 42 43 44 45 46 47 | |
tanh_weight(value, threshold, width)
Computes the tanh weight for viscosity profile and smoothing.
Args: value: Value threshold: Threshold value width: Width of smoothing
Returns: weight
Source code in aragog/utilities.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |