Skip to content

Commit

Permalink
py3k: Use Unicode in coord collapse.
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic committed Sep 16, 2015
1 parent 9717793 commit f9cc0f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/iris/coords.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,10 +963,10 @@ def collapsed(self, dims_to_collapse=None):
for index in np.ndindex(shape):
index_slice = (slice(None),) + tuple(index)
bounds.append(serialize(self.bounds[index_slice]))
dtype = np.dtype('S{}'.format(max(map(len, bounds))))
dtype = np.dtype('U{}'.format(max(map(len, bounds))))
bounds = np.array(bounds, dtype=dtype).reshape((1,) + shape)
points = serialize(self.points)
dtype = np.dtype('S{}'.format(len(points)))
dtype = np.dtype('U{}'.format(len(points)))
# Create the new collapsed coordinate.
coord = self.copy(points=np.array(points, dtype=dtype),
bounds=bounds)
Expand Down

0 comments on commit f9cc0f9

Please sign in to comment.