diff options
author | Sebastian Berg <sebastianb@nvidia.com> | 2023-05-03 12:36:43 +0200 |
---|---|---|
committer | Sebastian Berg <sebastianb@nvidia.com> | 2023-05-03 12:44:59 +0200 |
commit | 89486a335a478aac46be91b92e69267f9409b1be (patch) | |
tree | 495565abe628ea0f6fd2251dcf49be89cc79ac37 /numpy/array_api/tests/test_indexing_functions.py | |
parent | c37a577c9df74e29c97a7bb010de0b37f83870bb (diff) | |
download | numpy-89486a335a478aac46be91b92e69267f9409b1be.tar.gz |
MAINT: Reorganize the way windowing functions ensure float64 result
This roughly changes things so that we ensure a float64 working
values up-front. There is a tiny chance of precision changes if the
input was not float64 or error changes on bad input.
I don't think this should matter in practice, precision changes
(as far as I can tell) should happen rather the other way around.
Since float64 has 53bits mantissa, I think the arange should give
the correct result reliably for any sensible inputs.
There is an argument to be made that the windowing functions could
return float32 for float32 input, but I somewhat think this is OK
and users can be expected to just cast manually after the fact.
The result type is tested, but this ensures the tests pass also
when enabling weak promotion.
Diffstat (limited to 'numpy/array_api/tests/test_indexing_functions.py')
0 files changed, 0 insertions, 0 deletions