Commit df3a091
authored
linear_algebra: make matrix_inversion doctest deterministic (#15130)
numpy.linalg.inv can return platform-dependent float representations
(e.g. 0.6 vs 0.6000000000000001), which made the doctest fragile across
BLAS/LAPACK backends. Round the results in the doctests so the expected
output is deterministic, and add a second invertible-matrix example.1 parent 64646c5 commit df3a091
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
| |||
0 commit comments