Skip to content

Commit

Permalink
fix up reduce in rdf
Browse files Browse the repository at this point in the history
The comparison is deprecated is `res` is a numpy array. This is more robust.
  • Loading branch information
kain88-de committed Sep 20, 2018
1 parent c248ca3 commit 58b1281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pmda/rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def _conclude(self, ):
@staticmethod
def _reduce(res, result_single_frame):
""" 'add' action for an accumulator"""
if res == []:
if isinstance(res, list) and len(res) == 0:
# Convert res from an empty list to a numpy array
# which has the same shape as the single frame result
res = result_single_frame
Expand Down

0 comments on commit 58b1281

Please sign in to comment.