From 38be2fd05974c57a5234d199077b52365745bf18 Mon Sep 17 00:00:00 2001 From: Bas van Beek Date: Tue, 31 Aug 2021 17:01:11 +0200 Subject: [PATCH] DOC: Add a release not for `floating.is_integer` --- doc/release/upcoming_changes/19803.new_feature.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/release/upcoming_changes/19803.new_feature.rst diff --git a/doc/release/upcoming_changes/19803.new_feature.rst b/doc/release/upcoming_changes/19803.new_feature.rst new file mode 100644 index 00000000000..b35c581edcb --- /dev/null +++ b/doc/release/upcoming_changes/19803.new_feature.rst @@ -0,0 +1,14 @@ +``is_integer`` is now available to `numpy.floating` and `numpy.integer` +----------------------------------------------------------------------- +Based on its counterpart in `float` and `int, the numpy floating point and +integer types types now support `~float.is_integer`. Returns ``True`` if the +floating point number is finite with integral value, and ``False`` otherwise. + +.. code-block:: python + + >>> np.float32(-2.0).is_integer() + True + >>> np.float64(3.2).is_integer() + False + >>> np.int32(-2).is_integer() + True