summaryrefslogtreecommitdiff
path: root/docs/numpy.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'docs/numpy.ipynb')
-rw-r--r--docs/numpy.ipynb9
1 files changed, 2 insertions, 7 deletions
diff --git a/docs/numpy.ipynb b/docs/numpy.ipynb
index 4ed462b..41b6491 100644
--- a/docs/numpy.ipynb
+++ b/docs/numpy.ipynb
@@ -24,10 +24,6 @@
"# Import NumPy\n",
"import numpy as np\n",
"\n",
- "# Disable Pint's old fallback behavior (must come before importing Pint)\n",
- "import os\n",
- "os.environ['PINT_ARRAY_PROTOCOL_FALLBACK'] = \"0\"\n",
- "\n",
"# Import Pint\n",
"import pint\n",
"ureg = pint.UnitRegistry()\n",
@@ -780,8 +776,7 @@
"\n",
"This behaviour introduces some performance penalties and increased memory usage. Quantities that must be converted to other units require additional memory and CPU cycles. Therefore, for numerically intensive code, you might want to convert the objects first and then use directly the magnitude, such as by using Pint's `wraps` utility (see [wrapping](wrapping.rst)).\n",
"\n",
- "Array interface protocol attributes (such as `__array_struct__` and\n",
- "`__array_interface__`) are available on Pint Quantities by deferring to the corresponding `__array_*` attribute on the magnitude as casted to an ndarray. This has been found to be potentially incorrect and to cause unexpected behavior, and has therefore been deprecated. As of the next minor version of Pint (or when the `PINT_ARRAY_PROTOCOL_FALLBACK` environment variable is set to 0 prior to importing Pint as done at the beginning of this page), attempting to access these attributes will instead raise an AttributeError."
+ "Attempting to access array interface protocol attributes (such as `__array_struct__` and `__array_interface__`) on Pint Quantities will raise an AttributeError, since a Quantity is meant to behave as a \"duck array,\" and not a pure ndarray."
]
}
],
@@ -801,7 +796,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.6.7"
+ "version": "3.7.6"
}
},
"nbformat": 4,