79583059

Date: 2025-04-20 05:43:56
Score: 2.5
Natty:
Report link

.apply(np.linalg.norm, axis=1)

Is probably preferable since it is clearer, but when I'm just doing scratch work I often use:

df[list('xyz')].pow(2).sum(axis=1).pow(.5)

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: TacitIron Hav