diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2020-12-11 22:09:06 +0100 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2020-12-22 17:24:04 +0100 |
commit | 75c532dd95d7233de5a4f57554a88657380dc1ec (patch) | |
tree | 1abe3e177e0606b3e2fc2a592d010d62fa902d46 | |
parent | 4b27d3a54d7c8dd4d2ae502f85a15d8bc529ba86 (diff) | |
download | numpy-75c532dd95d7233de5a4f57554a88657380dc1ec.tar.gz |
REL: Added a release note
-rw-r--r-- | doc/release/upcoming_changes/17843.new_feature.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/17843.new_feature.rst b/doc/release/upcoming_changes/17843.new_feature.rst new file mode 100644 index 000000000..d2b9d2adc --- /dev/null +++ b/doc/release/upcoming_changes/17843.new_feature.rst @@ -0,0 +1,22 @@ +Added a mypy plugin for handling platform-specific `numpy.number` precisions +---------------------------------------------------------------------------- + +A mypy_ plugin is now available for automatically assigning the (platform-dependent) +precisions of certain `~numpy.number` subclasses, including the likes of +`~numpy.int_`, `~numpy.intp` and `~numpy.longlong`. See the documentation on +:ref:`scalar types <arrays.scalars.built-in>` for a comprehensive overview +of the affected classes. + +Note that while usage of the plugin is completely optional, without it the +precision of above-mentioned classes will be inferred as `~typing.Any`. + +To enable the plugin, one must add it to their mypy `configuration file`_: + +.. code-block:: ini + + [mypy] + plugins = numpy.typing.mypy_plugin + + +.. _mypy: http://mypy-lang.org/ +.. _configuration file: https://mypy.readthedocs.io/en/stable/config_file.html |