We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 008c8cb commit 8291334Copy full SHA for 8291334
climada/util/select.py
@@ -49,15 +49,17 @@ def get_attributes_with_matching_dimension(obj, dims):
49
list_of_attrs = []
50
for attr, value in obj.__dict__.items():
51
52
- try:
53
-
54
- if isinstance(value, list):
+ if isinstance(value, list):
+ try:
55
value = np.array(value)
+ except ValueError as verr:
56
+ if "inhomogenous shape" in str(verr):
57
+ continue
58
59
60
if all([dims.count(i) <= value.shape.count(i) for i in set(dims)]):
61
list_of_attrs.append(attr)
62
except AttributeError:
- pass
63
64
65
return list_of_attrs
0 commit comments