Daniel-Diaz / matrix

A Haskell native implementation of matrices and their operations.
BSD 3-Clause "New" or "Revised" License
35 stars 31 forks source link

Enhance features: Confound scalars and 1x1 matrix #33

Open Akaban opened 8 years ago

Akaban commented 8 years ago

Hello,

This is a well done package but I was asking something to myself: would it be possible to confound scalars and 1x1 matrix ? As a scalar can be seen as a 1x1 matrix and conversely. Is this possible in Haskell?

Cheers,

Akaban.

octopuscabbage commented 8 years ago

I don't see how we'd be able to do this without tracking dimensionality information in the type (which actually isn't too bad of an idea in a better dependently typed language)