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
where pre_calc_units can be a string ("dimensionless"), but a Unit object was expected. The string was created when implement_func was called for cumprod and nancumprod (by the way, cumprod also gets implemented with set_units_ufuncs). We can fix this by passing None as input_units instead, but if feasible I'd prefer "dimensionless" since that is way easier to read and understand. For that, we might need to preprocess the input_units parameter in implement_func.
The text was updated successfully, but these errors were encountered:
#867 is about the units of the result if one were to pass axis (and existed before #905), while this issue was introduced in #905 when implement_func was written. cumprod is only defined for dimensionless, so the resulting unit is not a problem.
Passing a
axis
argument tocumprod
/nancumprod
will make them fail. I tracked it down topint/pint/numpy_func.py
Line 62 in 4c3114c
pre_calc_units
can be a string ("dimensionless"
), but aUnit
object was expected. The string was created whenimplement_func
was called forcumprod
andnancumprod
(by the way,cumprod
also gets implemented withset_units_ufuncs
). We can fix this by passingNone
asinput_units
instead, but if feasible I'd prefer"dimensionless"
since that is way easier to read and understand. For that, we might need to preprocess theinput_units
parameter inimplement_func
.The text was updated successfully, but these errors were encountered: