We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec21f83 commit 2456f3cCopy full SHA for 2456f3c
pymie/__init__.py
@@ -33,12 +33,11 @@
33
"""
34
35
import numpy as np
36
-from pint import UnitRegistry
+import pint
37
38
-# Load the default unit registry from pint and use it everywhere.
39
-# Using the unit registry (and wrapping all functions) ensures that we don't
40
-# make unit mistakes
41
-ureg = UnitRegistry()
+# Load either the default unit registry or the registry that has been set by
+# packages that use pymie
+ureg = pint.get_application_registry()
42
Quantity = ureg.Quantity
43
44
@ureg.check('[length]', None)
0 commit comments