You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It may sound silly but it may be of interest to be able to compute the norm of [] so that one has not to catch this case before (would make my code more readable).
At the moment numpy.linalg.norm(numpy.array([]),ord=):
works with ord = 0,1,2,... giving the result 0. Although here is a incosistency returning np.int in the case of ord = 0 and np.float in the others.
works not not with ord = numpy.inf since this computes abs(x).max() without checking if x is nonempty.
It would be very nice, if in the [] case also for ord = inf one would return 0, which would be consistent with matlab behaviour.
The text was updated successfully, but these errors were encountered:
It may sound silly but it may be of interest to be able to compute the norm of [] so that one has not to catch this case before (would make my code more readable).
At the moment numpy.linalg.norm(numpy.array([]),ord=):
It would be very nice, if in the [] case also for ord = inf one would return 0, which would be consistent with matlab behaviour.
The text was updated successfully, but these errors were encountered: