numpy
numpy copied to clipboard
FIX: Include broadcasting for `rtol` argument in `matrix_rank`
Hi @asmeurer,
This PR fixes broadcasting of rtol argument in matrix_rank function that you pointed out in https://github.com/numpy/numpy/pull/25437#discussion_r1500043325.
This looks like it fixes the problem, although I'm not sure if the broadcast_to is necessary.
Should we add tests?
Thanks! A regression test would be great indeed.
This looks like it fixes the problem, although I'm not sure if the broadcast_to is necessary.
Should we add tests?
I changed broadcast_to to asarray to accept list inputs also (asarray(tol) is already present).
I added a regression test.