summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRussell Manser <russell.p.manser@ttu.edu>2020-07-03 11:52:13 -0500
committerRussell Manser <russell.p.manser@ttu.edu>2020-07-03 11:52:13 -0500
commita26e2d771bc1f1afe9b4abab96dfa84b0de76e7e (patch)
tree3c96d33ec2a11629a56572991f2b95e8605e7f40 /docs
parent2617280a7e10de277f8ee236f1d476e2288e463b (diff)
downloadpint-a26e2d771bc1f1afe9b4abab96dfa84b0de76e7e.tar.gz
Update docs with Pint Quantity wrapped Dask Array
Diffstat (limited to 'docs')
-rw-r--r--docs/numpy.ipynb27
1 files changed, 26 insertions, 1 deletions
diff --git a/docs/numpy.ipynb b/docs/numpy.ipynb
index c3e8fc9..65768f6 100644
--- a/docs/numpy.ipynb
+++ b/docs/numpy.ipynb
@@ -384,6 +384,31 @@
"cell_type": "markdown",
"metadata": {},
"source": [
+ "**Pint Quantity wrapping Dask Array**"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import dask.array as da\n",
+ "\n",
+ "d = da.arange(500, chunks=50)\n",
+ "\n",
+ "# Must create using Quantity class, otherwise Dask will wrap Pint Quantity\n",
+ "q = ureg.Quantity(d, ureg.kelvin)\n",
+ "\n",
+ "print(repr(q))\n",
+ "print()\n",
+ "print(repr(d * ureg.kelvin))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
"**xarray wrapping Pint Quantity wrapping Dask array wrapping Sparse COO**"
]
},
@@ -465,7 +490,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.6"
+ "version": "3.8.3"
}
},
"nbformat": 4,