Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if any(k is None for k in key):
return missing_value
elif isinstance(key, slice):
raise NotImplementedError()
else:
# scalar or array key
key = fixkey(key, filter_value)
if key is None:
return missing_value
else:
if not filter_value:
if (non_scalar_array(key) or
(isinstance(key, tuple) and
any(non_scalar_array(k) for k in key))):
# scalar filter, array or tuple key
if isinstance(expr_value, la.core.array.LArrayPointsIndexer):
expr_value = expr_value.array
return np.full_like(expr_value, missing_value)
elif isinstance(key, slice):
raise NotImplementedError()
else:
# scalar (or tuple of scalars) key
return missing_value
# print("fixed key", key)
return expr_value[key]