omas.search_in_array_structure

omas.search_in_array_structure(ods, conditions, no_matches_return=0, no_matches_raise_error=False, multiple_matches_raise_error=True)[source]

search for the index in an array structure that matches some conditions

Parameters
  • ods – ODS location that is an array of structures

  • conditions – dictionary (or ODS) whith entries that must match and their values * condition[‘name’]=value : check value * condition[‘name’]=True : check existance * condition[‘name’]=False : check not existance NOTE: True/False as flags for (not)existance is not an issue since IMAS does not support booleans

  • no_matches_return – what index to return if no matches are found

  • no_matches_raise_error – wheter to raise an error in no matches are found

  • multiple_matches_raise_error – whater to raise an error if multiple matches are found

Returns

list with indeces matching conditions