Skip to content

Commit

Permalink
py3k: Always use characters for string types.
Browse files Browse the repository at this point in the history
This may not be the best way to fix the test failure. String handling
may have to be made more explicit.
  • Loading branch information
QuLogic committed Sep 16, 2015
1 parent 732f6bf commit 45328f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/iris/fileformats/netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,8 @@ def _create_cf_variable(self, cube, dimension_names, coord):

if np.issubdtype(coord.points.dtype, np.str):
string_dimension_depth = coord.points.dtype.itemsize
if coord.points.dtype.kind == 'U':
string_dimension_depth //= 4
string_dimension_name = 'string%d' % string_dimension_depth

# Determine whether to create the string length dimension.
Expand Down

0 comments on commit 45328f6

Please sign in to comment.