We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've just noticed that pq.Quantity(3, 'min') raises an exception caused by parsing the unit.
pq.Quantity(3, 'min')
----> 1 pq.Quantity(3, 'min') File ~/pixi-main/.pixi/envs/default/lib/python3.12/site-packages/quantities/quantity.py:131, in Quantity.__new__(cls, data, units, dtype, copy) 128 return np.asanyarray(data, dtype=dtype).view(cls) 130 ret = np.asarray(data, dtype=dtype).view(cls) --> 131 ret._dimensionality.update(validate_dimensionality(units)) 132 return ret File ~/pixi-main/.pixi/envs/default/lib/python3.12/site-packages/quantities/quantity.py:34, in validate_dimensionality(value) 32 if isinstance(value, str): 33 try: ---> 34 return unit_registry[value].dimensionality 35 except (KeyError, UnicodeDecodeError): 36 return unit_registry[str(value)].dimensionality File ~/pixi-main/.pixi/envs/default/lib/python3.12/site-packages/quantities/registry.py:71, in UnitRegistry.__getitem__(self, label) 68 if "%" in label: label = label.replace("%", "percent") 69 if label.lower() == "in": label = "inch" ---> 71 return self.__registry[label] File ~/pixi-main/.pixi/envs/default/lib/python3.12/site-packages/quantities/registry.py:28, in UnitRegistry.__Registry.__getitem__(self, string) 26 for builtin in all_builtins: 27 if builtin in string: ---> 28 raise RuntimeError(f"String parsing error for {string}. Enter a string accepted by quantities") 30 try: 31 return eval(string, self.__context) RuntimeError: String parsing error for min. Enter a string accepted by quantities
It worked in the past (tested with numpy 1.22.4, quantities 0.14.1, python 3.10)
With numpy 1.26.4, quantities 0.16.0 and python 3.12 I get the above exception.
The text was updated successfully, but these errors were encountered:
I think this should be fixed by #242
Sorry, something went wrong.
min
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
I've just noticed that
pq.Quantity(3, 'min')
raises an exception caused by parsing the unit.It worked in the past (tested with numpy 1.22.4, quantities 0.14.1, python 3.10)
With numpy 1.26.4, quantities 0.16.0 and python 3.12 I get the above exception.
The text was updated successfully, but these errors were encountered: