Fix problem with np.linalg.norm for version <= 1.6.