|
Imported modules
|
|
import Numeric
import string
|
|
Functions
|
|
read1Ddat
readcol
readcols
readdat
readstdin
|
|
|
read1Ddat
|
read1Ddat ( fname, typecode=None )
Read a one-dimensional array from a file
This is useful when the rows in the file do not have the same
number of columns. Comments (begining with #) and blank lines
are allowed.
Arguments:
-
fname
- Name of the file to load
Optional arguments:
-
typecode
- The precision of the array to be read.
|
|
|
readcol
|
readcol (
fname,
col=1,
typecode=None,
)
Read a column of an ASCII file and load it in a NumPy array
Columns are human-numbered (start with 1 instead of 0)
Arguments:
-
fname
- Name of the file to load
Optional arguments:
-
col
- The column number to read. Defaults to 1
(the first one)
-
typecode
- The precision of the array to be read.
|
|
|
readcols
|
readcols (
fname,
cols=[ 1 ],
typecode=None,
)
Read a number of columns of an ASCII file and load them in a NumPy array
Columns are human-numbered (start with 1 instead of 0)
Arguments:
-
fname
- Name of the file to load
Optional arguments:
-
cols
- A sequence containing the numbers of the columns
to be read. Repeated column numbers are allowed.
Defaults to [ 1 ] (the first one)
-
typecode
- The precision of the array to be read.
|
|
|
readdat
|
readdat ( fname, typecode=None )
Read a NumPy array from a file
Comments are allowed just begining the comment lines with #.
Blank lines are also allowed. All rows must have the same number
of columns.
Arguments:
-
fname
- Name of the file to load
Optional arguments:
-
typecode
- The precision of the array to be read.
|
|
|
readstdin
|
readstdin ( typecode=None )
Read a NumPy array from standard input
Optional arguments:
-
typecode
- The precision of the array to be read.
|