2 ms·
Or just look at Orthotope: https://hackage.haskell.org/package/orthotope https://hackage.haskell.org/package/orthotope "Multidimensional arrays inspired by APL
by tome 3y ago
Or just look at Orthotope: https://hackage.haskell.org/package/orthotope https://hackage.haskell.org/package/orthotope
"Multidimensional arrays inspired by APL"
- dan-robertson 3y agoI don’t understand how to express the type of + with the shaped api. The examples are either operating on equal shapes or take advantage of fromInteger to multiply by a scalar. One could write eg add x y = broadcast x + broadcast y, but that now allows + to output arrays with arbitrary extra outer dimensions, whereas an apl + rejects some inputs but has an output shape that is a deterministic function of the input shapes
- tome 3y agoIf you tell me what + should do then maybe I can help. Does it broadcast to the higher-dimensional of the two arguments?