RFC: specify expected behavior for matrix_norm
and vector_norm
when provided an empty array
#901
Labels
RFC
Request for comments. Feature requests and proposed changes.
It would be useful for the specification to state the expected result of an empty norm (related to the discussion in numpy/numpy#28343)
In #232, it was decided that
sum
andprod
of empty arays should return0
and1
respectively, as these are the additive and multiplicative identites, and formin
andmax
to leave the behavior explicitly undefined.If we extend this logic to
matrix_norm
, it implies that forord='fro'
orord='nuc'
, the result for an empty matrix should be 0.0, and for other values oford
the behavior is undefined.Extending this logic to
vector_norm
, it implies that for an empty vector the p-norm should be 0.0 for positivep
; the correct behavior for negative and infinitep
are less clear to me.The text was updated successfully, but these errors were encountered: