scalarize#
- caput.util.arraytools.scalarize(dtype: numpy.typing.DTypeLike = np.float64) collections.abc.Callable[source]#
Handle scalars and other iterables being passed to numpy requiring code.
- Parameters:
- dtype
dtype The output datatype. Used only to set the return type of zero-length arrays.
- dtype
- Returns:
- scalarized
callable() Scalarized function.
- scalarized