| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
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
....
Documentation
readVectorFromTextFile :: (Num e, Read e, Unbox e) => FilePath -> IO (Array U DIM1 e) Source #
Read a vector from a text file.
- WARNING: This is implemented fairly naively, just using
Stringsunder the covers. It will be slow for large data files. - It also doesn't do graceful error handling.
If the file has the wrong format you'll get a confusing
error.