odlgroup / odl

Operator Discretization Library https://odlgroup.github.io/odl/
Mozilla Public License 2.0
374 stars 105 forks source link

Remove some type-inconsistent tests. #1653

Closed leftaroundabout closed 2 months ago

leftaroundabout commented 3 months ago

Reducing (aka folding) an operation like == over an array of e.g. floating-point numbers does not really make any sense, because after the first application one has a boolean which to compare to a number is ill-typed.

This only ever worked because old NumPy would apply implicit type widening, but newer versions rightfully do not support this anymore. Since the test only checked whether ODL gave the same results as NumPy, but NumPy does not give results for these cases anymore, it is only reasonable to remove the tests.

All these were done both for discr_space and tensor_space, with unfortunate redundancy in the testing code, so I also needed to apply the patch twice.

pep8speaks commented 3 months ago

Checking updated PR...

Line 869:11: E127 continuation line over-indented for visual indent

Line 1505:11: E127 continuation line over-indented for visual indent

Comment last updated at 2024-08-14 17:32:13 UTC