repa-io- Read and write Repa arrays in various formats.



Read and write matrices as ASCII text files.

The file format is like:

	MATRIX			-- header
	100 100			-- width and height
	1.23 1.56 1.23 ...	-- data, separated by whitespace



readMatrixFromTextFile :: (Elt a, Num a, Read a) => FilePath -> IO (Array DIM2 a)Source

Read a matrix from a text file.

WARNING: This doesn't do graceful error handling. If the file has the wrong format you'll get a confusing error.

writeMatrixToTextFile :: (Elt a, Show a) => FilePath -> Array DIM2 a -> IO ()Source

Write a matrix as a text file.