Open maxrothman opened 6 months ago
Makes sense. Any preference for API? Remembering of course that arbitrary subsets of dimensions might get reversed or rotated.....
No particular preference! The multiple dimensions part definitely needs to be taken into account. I'd assume you don't want to make APL's mistake by splitting ⌽ and ⊖ as well.
core.matrix has pretty good coverage of the APL primitives, but one notable exception is the reverse function (monadic ⌽ and ⊖). For 2d matrices with native Clojure sequences, one can work around the problem with
(map reverse m)
, but it’d be nice to have non-abstraction-breaking core.matrix versions of these.In a similar vein, there’s also no rotate functions. While you can work around this with
(transpose (reflect m))
, I suspect that a library implementation could achieve better performance.