News for hackers. Stuff that matters.
Re:J Notation as a Tool of Thought by worc3131 on Saturday August 15, 2020 @03:15PM (#24171442)
This 100 character version is probably the cleanest.

    M = np.reshape(np.arange(16),(4,4))
    np.array([np.roll(M,(i,j),(0,1)) 
              for i in [1,0,-1]
              for j in [1,0,-1]])
Re:J Notation as a Tool of Thought by jonahx on Saturday August 15, 2020 @06:13PM (#24172884)
That requires you to break out of the array paradigm and drop back down to procedural looping. Which is what you'd expect since numpy is array operations bolted onto python as a library and J is array operations baked into the language itself.