Skip to content

Commit

Permalink
DOC: Add a release not for floating.is_integer
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas van Beek committed Aug 31, 2021
1 parent 9f11564 commit 38be2fd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions 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

0 comments on commit 38be2fd

Please sign in to comment.