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 000000000000..b35c581edcba --- /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