Hacker News new | ask | show | jobs
by freyrs3 4387 days ago
> you can multiply n by k, k by m matrices to get an n by m matrix, but anything else is a type error.

This is exactly how Repa works, it uses a Peano encoding of the extent of dimensions to make invalid array operations inexpressible.

1 comments

Ok. This isn't obvious at all by looking at the documentation, also since extent doesn't seem to appear in the type signature of a matrix instance.