mockslurm.process_db.get_filtered_DB_mask¶
- mockslurm.process_db.get_filtered_DB_mask(db_file: File, fields_values: Dict[str, str | List[str]]) ndarray [source]¶
Get a mask selecting the DB rows where the field values are equal to fields_values values.
- Parameters:
db_file (h5py.File) – Opened file handle to the database HDF5 file
fields_values (Dict[str, str | List[str]]) – Map from fields to allowed fields values. Rows where the fields value is not equal to one of the field values are not selected. Key: field name, eg “NAME”, “USER” values: field value, eg “Robert”, [“Robert”, “Roberta”]
- Returns:
Index mask array, True where the row’s fields are equal to the field_values.
- Return type:
np.ndarray