numpy icon indicating copy to clipboard operation
numpy copied to clipboard

FIX: Include broadcasting for `rtol` argument in `matrix_rank`

Open mtsokol opened this issue 1 year ago • 1 comments

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.

mtsokol avatar Feb 23 '24 12:02 mtsokol

This looks like it fixes the problem, although I'm not sure if the broadcast_to is necessary.

Should we add tests?

asmeurer avatar Feb 23 '24 22:02 asmeurer

Thanks! A regression test would be great indeed.

rgommers avatar Feb 25 '24 10:02 rgommers

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.

mtsokol avatar Feb 26 '24 09:02 mtsokol