multiml.database.numpy_database module
NumpyDatabase module.
- class multiml.database.numpy_database.NumpyDatabase
Bases:
Database
Base class of Numpy database.
- __init__()
- initialize(data_id)
- add_data(data_id, var_name, idata, phase, mode=None)
Add data to database for given data_id, var_name and phase.
If var_name already exists, data need to be appended
- update_data(data_id, var_name, idata, phase, index, mode=None)
Update (replace) data in database for given data_id, var_name, phase and index.
- get_data(data_id, var_name, phase, index)
Get data for given data_id, var_name, phase and index from database.
- delete_data(data_id, var_name, phase)
Delete data for given data_id, var_name and phase from database.
- create_empty(data_id, var_name, phase, shape, dtype)
- get_metadata(data_id, phase, mode=None)
Returns a dictionary of metadata for a given data_id and phase.
- The dict contains: {‘var_name’: {‘type’: type of variable,
‘total_events’: number of samples}
- get_data_ids()