Skip to content

Commit

Permalink
Fix problem iterating over a 0-d numpy array. Issue #22
Browse files Browse the repository at this point in the history
  • Loading branch information
RosalynHatcher committed Mar 12, 2018
1 parent 6bb96d9 commit 5bbbdc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cfchecker/cfchecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ def getCoordinateDataVars(self):
# self._add_warn("Data for variable %s lies outside cell boundaries" % var,
# var, code="7.1")
# else:
for i, value in enumerate(varData):
for i, value in (enumerate(varData) if len(varData.shape) else enumerate([varData])):
try:
if not (boundsData[i][0] <= value <= boundsData[i][1]):
self._add_warn("Data for variable %s lies outside cell boundaries" % var,
Expand Down

0 comments on commit 5bbbdc3

Please sign in to comment.