The API in that package doesn't seem to offer any operations that return updated seeds (which is obviously a big no-no when doing randomness in a pure language). You will have to patch the package to return updated seeds or use a different package.

hmatrix is not intended for image processing (see the mentioned repa-Devil and also easyVision), but you can try conv2.

haskell,matrix,linear-algebra,hmatrix

The problem arises from the difference in type signatures. matrix :: Int -> [ℝ] -> Matrix ℝ (><) :: Storable a => Int -> Int -> [a] -> Matrix a So actually matrix 3 [1,2,3,4,5,6,7,8,9 ] has type Matrix ℝ while ( 3 >< 3 ) [1,2,3,4,5,6,7,8,9 ] has type...

You can perform exact operations on matrices using bed-and-breakfast package. Here's sample ghci session: >>> import Numeric.Matrix >>> import Data.Ratio >>> let m = fromList [[1 % 2, 2 % 3], [3 % 4, 4 % 5]] :: Matrix Rational >>> det m (-1) % 10 >>> m * m...

No - there is really no instance for Element Int - see here: http://hackage.haskell.org/package/hmatrix-0.16.0.3/docs/Numeric-LinearAlgebra-HMatrix.html#t:Element Just go for Matrix Float or Matrix Double if you can...

In HMatrix, scale :: Container c e => e -> c e -> c e does what it says on the label (multiplies the e in a c e by the first e). Here are some usage examples here: https://hackage.haskell.org/package/hmatrix-0.16.1.4/docs/src/Data-Packed-Internal-Numeric.html It should be noted that scale x constructs a Container...

You could add an explicit import for the Vector type: import Numeric.LinearAlgebra import qualified Data.Vector as V import Data.Vector (Vector) Though, I didn't know external modules could break depending on how you import modules they depend on....