Skip to content

BUG: Fix empty linalg.norm for ord=inf and ord=-inf. - #10992

Closed
hameerabbasi wants to merge 1 commit into
numpy:masterfrom
hameerabbasi:fix-norm
Closed

hameerabbasi wants to merge 1 commit into
numpy:masterfrom
hameerabbasi:fix-norm

Conversation

@hameerabbasi

@hameerabbasi hameerabbasi commented Apr 27, 2018 •

Copy link
Copy Markdown
Contributor

Fixes the edge cases for the calculation of an empty np.linalg.norm, for ord=np.inf (returns 0.0) and ord=-np.inf (returns np.inf).

Fixes #3763

@hameerabbasi

Copy link
Copy Markdown
Contributor Author

cc @eric-wieser As per your request. 😄

@eric-wieser

Copy link
Copy Markdown
Member

This fixes #3763, right? I'm not sure the definition is clear for ord=-inf

@hameerabbasi

hameerabbasi commented Apr 28, 2018 •

Copy link
Copy Markdown
Contributor Author

Edited with magic comment. I could take ord=-np.inf out, if desired. It's the minimum over the nonnegative reals, so it should be np.inf.

@carlosgmartin

Copy link
Copy Markdown
Contributor

@hameerabbasi What happened to this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants