You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can create an uncertainty array from a pair of arrays, one representing nominal values and one representing error values. However, I cannot seem to figure out how to pass a list or array of Uncertainty values to create a new np.array of Uncertainty values.
Indeed, this implementation of array seems to prevent such:
def __array__(self, t=None) -> np.ndarray:
warnings.warn(
"The uncertainty is stripped when downcasting to ndarray.",
NumpyDowncastWarning,
stacklevel=2,
)
return np.asarray(self._nom)
ndarrays can hold object types (which is what makes PintArrays) work.
The text was updated successfully, but these errors were encountered:
I can create an uncertainty array from a pair of arrays, one representing nominal values and one representing error values. However, I cannot seem to figure out how to pass a list or array of Uncertainty values to create a new np.array of Uncertainty values.
Indeed, this implementation of array seems to prevent such:
ndarrays can hold object types (which is what makes PintArrays) work.
The text was updated successfully, but these errors were encountered: