summaryrefslogtreecommitdiff
path: root/pint/compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'pint/compat.py')
-rw-r--r--pint/compat.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/pint/compat.py b/pint/compat.py
index e6037b2..e8e1a1b 100644
--- a/pint/compat.py
+++ b/pint/compat.py
@@ -36,27 +36,6 @@ class BehaviorChangeWarning(UserWarning):
pass
-array_function_change_msg = """The way Pint handles NumPy operations has changed with the
-implementation of NEP 18. Unimplemented NumPy operations will now fail instead of making
-assumptions about units. Some functions, eg concat, will now return Quanties with units, where
-they returned ndarrays previously. See https://github.com/hgrecco/pint/pull/905.
-
-To hide this warning, wrap your first creation of an array Quantity with
-warnings.catch_warnings(), like the following:
-
-import numpy as np
-import warnings
-from pint import Quantity
-
-with warnings.catch_warnings():
- warnings.simplefilter("ignore")
- Quantity([])
-
-To disable the new behavior, see
-https://www.numpy.org/neps/nep-0018-array-function-protocol.html#implementation
-"""
-
-
try:
import numpy as np
from numpy import ndarray
@@ -92,7 +71,6 @@ try:
return False
HAS_NUMPY_ARRAY_FUNCTION = _test_array_function_protocol()
- SKIP_ARRAY_FUNCTION_CHANGE_WARNING = not HAS_NUMPY_ARRAY_FUNCTION
NP_NO_VALUE = np._NoValue
@@ -107,7 +85,6 @@ except ImportError:
NUMPY_VER = "0"
NUMERIC_TYPES = (Number, Decimal)
HAS_NUMPY_ARRAY_FUNCTION = False
- SKIP_ARRAY_FUNCTION_CHANGE_WARNING = True
NP_NO_VALUE = None
def _to_magnitude(value, force_ndarray=False, force_ndarray_like=False):