You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.
Pheraps creating a function like: elementWiseMonoid :: (Monoid a,Monoid b) => ( a -> b -> c ) -> Matrix a -> Matrix b -> Matrix c elementWiseMonoid f m m' = elementWiseUnsafe f (setSize rows columns m) (setSize rows columns m') where rows = max ( nrows m ) ( nrows m' ) columns = max ( ncols m ) ( ncols m' )
and using it to instantiate Num could help.
I did not test that.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you apply the
sum
function to a list of nxm matrices you get a 1x1 matrix as result e.g.sum [M.fromLists [[1,1]], M.fromLists [[2,2]]] == ( 3 )
The text was updated successfully, but these errors were encountered: