Skip to content

Commit

Permalink
Merge pull request #120 from jakirkham/fix_astype_repr
Browse files Browse the repository at this point in the history
Fix representation of AsType's dtypes
  • Loading branch information
alimanfoo committed Feb 21, 2017
2 parents aeb1354 + 28b480d commit 1bce5da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions zarr/codecs.py
Expand Up @@ -557,10 +557,10 @@ def get_config(self):

def __repr__(self):
return (
'%s(encode_dtype=%s, decode_dtype=%s)' % (
'%s(encode_dtype=%r, decode_dtype=%r)' % (
type(self).__name__,
self.encode_dtype,
self.decode_dtype
self.encode_dtype.str,
self.decode_dtype.str
)
)

Expand Down
2 changes: 1 addition & 1 deletion zarr/tests/test_codecs.py
Expand Up @@ -347,7 +347,7 @@ def test_decode_input(self):

def test_repr(self):
codec = self.init_codec(encode_dtype='i4', decode_dtype='i8')
expect = 'AsType(encode_dtype=int32, decode_dtype=int64)'
expect = "AsType(encode_dtype='<i4', decode_dtype='<i8')"
actual = repr(codec)
eq(expect, actual)

Expand Down

0 comments on commit 1bce5da

Please sign in to comment.