You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def _discover_depend_variables(vardata: Dict[str, npt.NDArray], varatts: Dict[str, Any], varprops: Dict[str, VDRInfo]) -> List[str]:
# This loops through the variable attributes to discover which variables are the coordinates of other variables,
# Unfortunately, there is no easy way to tell this by looking at the variable ITSELF,
# you need to look at all variables and see if one points to it.
depend_regex = re.compile("depend_[0-9]+$")
list_of_depend_vars = []
for v in varatts:
depend_keys = [x for x in list(varatts[v].keys()) if depend_regex.match(x.lower())]
for d in depend_keys:
if varatts[v][d] in vardata:
It'll error out if the Depend_X attribute is anything other than a string. So first we should add a check that "d" is a string, and give an error if not.
Then we should write a unit test, and ensure it fails
The text was updated successfully, but these errors were encountered:
In:
It'll error out if the Depend_X attribute is anything other than a string. So first we should add a check that "d" is a string, and give an error if not.
Then we should write a unit test, and ensure it fails
The text was updated successfully, but these errors were encountered: