News for hackers. Stuff that matters.
Re:Help us collect modern Python NumPy code solutions by johndough on Monday March 28, 2022 @08:44AM (#30829916)
I think a fairer comparison would be

    np.linalg.norm(x)
or even

    norm(x)
if you

    import numpy.linalg.norm as norm
beforehand. This comes with the advantage that you can look up the function by name to know what it does instead of having to look up chains of symbols on several websites.
Re:Help us collect modern Python NumPy code solutions by RodgerTheGreat on Monday March 28, 2022 @10:15AM (#30830699)
In practice, if you're reading a J expression which contains unfamiliar primitives, there's only one place you need to look: https://code.jsoftware.com/wiki/NuVoc

Idioms are composed from primitives, but many of them are shorter than a descriptive name would be, and since the set of primitives is small (compared to the standard library in most languages), it doesn't take that long to memorize most or all of the symbols.