Github user kwhitehall commented on a diff in the pull request:
https://github.com/apache/climate/pull/192#discussion_r28974879
--- Diff: ocw/dataset.py ---
@@ -180,17 +180,23 @@ def _validate_inputs(self, lats, lons, times, values):
err_msg = "Longitude Array should be 1 dimensional. %s
dimensions found." % lon_dim
elif time_dim != 1:
err_msg = "Time Array should be 1 dimensional. %s dimensions
found." % time_dim
- elif value_dim != 3:
- err_msg = "Value Array should be 3 dimensional. %s dimensions
found." % value_dim
+ elif value_dim < 2:
+ err_msg = "Value Array should be at least 2 dimensional. %s
dimensions found." % value_dim
# Finally check that the Values array conforms to the proper shape
- elif values.shape != (time_count, lat_count, lon_count):
+ if value_dim == 2 and values.shape != (lat_count, lon_count):
err_msg = """Value Array must be of shape (times, lats, lons).
-Expected shape (%s, %s, %s) but received (%s, %s, %s)""" % (time_count,
- lat_count,
- lon_count,
-
values.shape[0],
-
values.shape[1],
-
values.shape[2])
+ Expected shape (%s, %s, %s) but received (%s, %s, %s)""" % (lat_count,
--- End diff --
Thanks @cgoodale! Will update
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---