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

Data.Array.Repa.IO.Vector

Description

Read and write vectors as ASCII text files.

The file format is like:

	VECTOR			-- header
	100			-- length of vector
	1.23 1.56 1.23 ...	-- data, separated by whitespace
	....

Synopsis

Documentation

readVectorFromTextFile :: (Elt a, Num a, Read a) => FilePath -> IO (Array DIM1 a)Source

Read a vector 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.

writeVectorToTextFile :: (Elt a, Show a) => Array DIM1 a -> FilePath -> IO ()Source

Write a vector as a text file.