diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-11-05 01:16:16 -0800 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-04-10 23:40:54 -0700 |
commit | 79799b32a13a3dfb15eb48bdd8b4c6a433ce50df (patch) | |
tree | f9e1c25d13b052c29b288e9e29f4cf9667c6abfe /doc/release | |
parent | d7a73f8c700edcf150d59a570e0173b60f84c7a7 (diff) | |
download | numpy-79799b32a13a3dfb15eb48bdd8b4c6a433ce50df.tar.gz |
ENH: Implement `np.floating.as_integer_ratio`
This matches the builtin `float.as_integer_ratio` and (in recent python versions) `int.as_integer_ratio`.
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/1.17.0-notes.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/release/1.17.0-notes.rst b/doc/release/1.17.0-notes.rst index 1155449a7..d454c09f7 100644 --- a/doc/release/1.17.0-notes.rst +++ b/doc/release/1.17.0-notes.rst @@ -129,6 +129,12 @@ New mode "empty" for ``np.pad`` This mode pads an array to a desired shape without initializing the new entries. +Floating point scalars implement ``as_integer_ratio`` to match the builtin float +-------------------------------------------------------------------------------- +This returns a (numerator, denominator) pair, which can be used to construct a +`fractions.Fraction`. + + Improvements ============ |