diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-04-19 17:57:18 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-04-19 18:18:12 -0700 |
commit | 55c7ed2c6822b5a5b30db7472c863dc1fa0c338f (patch) | |
tree | e62d7d73229a2959bc9f8b16061631d39c072717 /numpy/lib/tests/test_function_base.py | |
parent | 8f31f95910d27da75941bbbbde7ef1ecec9b0f74 (diff) | |
download | numpy-55c7ed2c6822b5a5b30db7472c863dc1fa0c338f.tar.gz |
BUG/ENH: Make floor, ceil, and trunc call the matching special methods
Previously `np.ceil` would call `o.ceil()` on each element of an object array.
This is inconsistent with the builtin python way of handling this, calling `o.__ceil__()`.
This changes these three functions to use the corresponding functions in the `math` module, which do the special method lookup.
As a result, they now work on arrays of `Fraction` and `Decimal` objects.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
0 files changed, 0 insertions, 0 deletions