Correct computation of L0-norm

The existing norm computation correctly computes the Ln-norm for n >= 1.
For L0, however, the result is always inf due to the presence of the 0th
root. This commit adds a special case for L0, which is computed the
conventional way: by simply counting non-zero elements.
1 file changed