summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorsignor82 <Giorgio.Signorello@imec.be>2020-08-22 00:16:02 +0200
committersignor82 <Giorgio.Signorello@imec.be>2020-08-22 00:16:02 +0200
commit5fb86a328fa1aeb835a535b1d3dccad0cf1cc5a0 (patch)
treef3231afda1bf59ae361de863ed3f9df5355e791a /docs
parentb2549114783c9c137cf5a2464b04b5f2928f4cb8 (diff)
parent91194f37ac393ac44d53d185c870c4dde2b58724 (diff)
downloadpint-5fb86a328fa1aeb835a535b1d3dccad0cf1cc5a0.tar.gz
Merge branch 'master' of https://github.com/hgrecco/pint into log_units
Diffstat (limited to 'docs')
-rw-r--r--docs/contributing.rst28
-rw-r--r--docs/numpy.ipynb2
-rw-r--r--docs/tutorial.rst8
3 files changed, 32 insertions, 6 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst
index d5c8703..19157f1 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -63,8 +63,34 @@ To build the documentation, invoke Sphinx from the ``docs`` directory::
$ cd docs
$ make html
+Extension Packages
+------------------
+
+Pint naturally integrates with other libraries in the scientific Python ecosystem, and
+a small number of
+`extension/compatibility packages<numpy.html#Compatibility-Packages>`_ have arisen to
+aid in compatibility between certain packages. Pint's rule of thumb for integration
+features that work best as an extension pacakage versus direct inclusion in Pint is:
+
+* Extension (separate packages)
+
+ * Duck array types that wrap Pint (come above Pint in
+ `the type casting hierarchy<numpy.html#Technical-Commentary>`_)
+
+ * Uses features independent/on top of the libraries
+
+ * Examples: xarray, Pandas
+
+* Integration (built in to Pint)
+
+ * Duck array types wrapped by Pint (below Pint in the type casting hierarchy)
+
+ * Intermingling of APIs occurs
+
+ * Examples: Dask
+
.. _github: http://github.com/hgrecco/pint
.. _`issue tracker`: https://github.com/hgrecco/pint/issues
.. _`bors-ng`: https://github.com/bors-ng/bors-ng
-.. _`github docs`: https://help.github.com/articles/closing-issues-via-commit-messages/ \ No newline at end of file
+.. _`github docs`: https://help.github.com/articles/closing-issues-via-commit-messages/
diff --git a/docs/numpy.ipynb b/docs/numpy.ipynb
index 7b8a0a3..fa987b2 100644
--- a/docs/numpy.ipynb
+++ b/docs/numpy.ipynb
@@ -453,7 +453,7 @@
"To aid in integration between various array types and Pint (such as by providing convenience methods), the following compatibility packages are available:\n",
"\n",
"- [pint-pandas](https://github.com/hgrecco/pint-pandas)\n",
- "- [pint-xarray](https://github.com/TomNicholas/pint-xarray/) (in early development as of April 2020, with [extra discussion here](https://github.com/hgrecco/pint/issues/849#issuecomment-579992247) - please come and help!)\n",
+ "- [pint-xarray](https://github.com/xarray-contrib/pint-xarray/)\n",
"\n",
"(Note: if you have developed a compatibility package for Pint, please submit a pull request to add it to this list!)"
]
diff --git a/docs/tutorial.rst b/docs/tutorial.rst
index e473ac4..1c64c4e 100644
--- a/docs/tutorial.rst
+++ b/docs/tutorial.rst
@@ -319,10 +319,10 @@ Pint also supports `f-strings`_ from python>=3.6 :
>>> print(f'The str is {accel:~.3e}')
The str is 1.300e+00 m / s ** 2
>>> print(f'The str is {accel:~H}') # HTML format (displays well in Jupyter)
- The str is \[1.3\ m/{s}^{2}\]
+ The str is 1.3 m/s<sup>2</sup>
-But Pint also extends the standard formatting capabilities for unicode and
-LaTeX representations:
+But Pint also extends the standard formatting capabilities for unicode, LaTeX, and HTML
+representations:
.. doctest::
@@ -335,7 +335,7 @@ LaTeX representations:
'The LaTeX representation is 1.3\\ \\frac{\\mathrm{meter}}{\\mathrm{second}^{2}}'
>>> # HTML print - good for Jupyter notebooks
>>> 'The HTML representation is {:H}'.format(accel)
- 'The HTML representation is \\[1.3\\ meter/{second}^{2}\\]'
+ 'The HTML representation is 1.3 meter/second<sup>2</sup>'
If you want to use abbreviated unit names, prefix the specification with `~`: