anypytools.datautils#
Created on Mon Jan 16 11:40:42 2012.
@author: mel
Module Contents#
Functions#
Create a generator which opens anydata.h5 files. |
|
Create a generator which opens AnyOutput files. |
|
Read an AnyOutput file. |
API#
- anypytools.datautils.anydatah5_generator(folder=None, match='.*(\\.h5)')#
Create a generator which opens anydata.h5 files.
- Parameters:
- Yields:
h5py_file (array_like) – a h5_py file opened with anypytools.h5py_wrapper
filename (str) – name of the file from which the data was read
Examples
>>> for (h5, filename) in anydatah5_generator(): print(h5)
- anypytools.datautils.anyoutputfile_generator(folder=None, match='.*\\.(csv|txt)')#
Create a generator which opens AnyOutput files.
- Parameters:
- Yields:
data (array_like) – data collumns in the anyoutput file
header (list) – list of the collumn names
constants (dict) – mapping with constants found in the file
filename (str) – name of the file from which the data was read
Examples
>>> for (data, header, const, fn) in anyoutputfile_generator(): print(fn) print(header) print(data.shape)