summaryrefslogtreecommitdiff
path: root/numpy/core/getlimits.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2022-11-21 11:27:30 +0100
committerSebastian Berg <sebastianb@nvidia.com>2022-11-22 17:38:33 +0100
commit8b9b0efbc08a502627f455ec59656fce68eb10d7 (patch)
treeb216d55ea218e21b376f99dbaa23abd8e5a8ce51 /numpy/core/getlimits.py
parent742545f1336e7cd12cdf656792c44b90b9f0f4b9 (diff)
downloadnumpy-8b9b0efbc08a502627f455ec59656fce68eb10d7.tar.gz
DEP: Finalize MachAr and machar deprecations
This removes the attributes on finfo and the "public" module. It also deprecates `np.core.MachAr`. We should be able to get away with just deleting it, but there seems little reason to not just deprecate it for now.
Diffstat (limited to 'numpy/core/getlimits.py')
-rw-r--r--numpy/core/getlimits.py23
1 files changed, 3 insertions, 20 deletions
diff --git a/numpy/core/getlimits.py b/numpy/core/getlimits.py
index 2c0f462cc..45818b326 100644
--- a/numpy/core/getlimits.py
+++ b/numpy/core/getlimits.py
@@ -352,6 +352,9 @@ def _get_machar(ftype):
def _discovered_machar(ftype):
""" Create MachAr instance with found information on float types
+
+ TODO: MachAr should be retired completely ideally. We currently only
+ ever use it system with broken longdouble (valgrind, WSL).
"""
params = _MACHAR_PARAMS[ftype]
return MachAr(lambda v: array([v], ftype),
@@ -387,11 +390,6 @@ class finfo:
iexp : int
The number of bits in the exponent portion of the floating point
representation.
- machar : MachAr
- The object which calculated these parameters and holds more
- detailed information.
-
- .. deprecated:: 1.22
machep : int
The exponent that yields `eps`.
max : floating point number of the appropriate type
@@ -432,7 +430,6 @@ class finfo:
See Also
--------
- MachAr : The implementation of the tests that produce this information.
iinfo : The equivalent for integer data types.
spacing : The distance between a value and the nearest adjacent number
nextafter : The next floating point value after x1 towards x2
@@ -595,20 +592,6 @@ class finfo:
"""
return self.smallest_normal
- @property
- def machar(self):
- """The object which calculated these parameters and holds more
- detailed information.
-
- .. deprecated:: 1.22
- """
- # Deprecated 2021-10-27, NumPy 1.22
- warnings.warn(
- "`finfo.machar` is deprecated (NumPy 1.22)",
- DeprecationWarning, stacklevel=2,
- )
- return self._machar
-
@set_module('numpy')
class iinfo: