arrayio

Array text file IO. Some tools to write and read MD-like 3D arrays.

HEADER_COMMENT

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

HEADER_MAXLINES

int([x]) -> integer int(x, base=10) -> integer

TXT_MAXDIM

int([x]) -> integer int(x, base=10) -> integer

_read_header_config(fh[, header_maxlines, ...])

Read a ini-style file from the header of a text file.

_write_header_config(fh, config[, ...])

Write ini-style config file from config prefixed with header_comment to file handle fh.

arr2d_to_3d(arr, shape[, axis])

Reshape 2d array arr to 3d array of shape, with 2d chunks aligned along axis.

readtxt(fh[, axis, shape, header_maxlines, ...])

Read arrays from .txt file using np.loadtxt().

writetxt(fn, arr[, axis, maxdim, header])

Write 1d, 2d or 3d arrays to txt file.