Commit cff3431
committed
BUG: fix flaky clip with float32
Testing `clip` converts array elements to builtin types and uses exact equaity.
Converting `out` from float32 to 64-bit builtin float incurs floating-point errors,
and further exact equality testing fails. So use `math.isclose` instead.
closes gh-3391 parent 3fb693c commit cff3431
1 file changed
+10
-1
lines changedLines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
1093 | 1096 | | |
1094 | 1097 | | |
1095 | 1098 | | |
1096 | | - | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1097 | 1106 | | |
1098 | 1107 | | |
1099 | 1108 | | |
| |||
0 commit comments