Skip to content

Commit 2a5c613

Browse files
committed
Use string representations of AsType's dtypes.
1 parent ca7e01b commit 2a5c613

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

numcodecs/astype.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ def get_config(self):
8080

8181
def __repr__(self):
8282
return (
83-
'%s(encode_dtype=%s, decode_dtype=%s)' % (
83+
'%s(encode_dtype=%r, decode_dtype=%r)' % (
8484
type(self).__name__,
85-
self.encode_dtype,
86-
self.decode_dtype
85+
self.encode_dtype.str,
86+
self.decode_dtype.str
8787
)
8888
)

numcodecs/tests/test_astype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ def test_config():
5757

5858

5959
def test_repr():
60-
check_repr("AsType(encode_dtype=int32, decode_dtype=int64)")
60+
check_repr("AsType(encode_dtype='<i4', decode_dtype='<i2')")

0 commit comments

Comments
 (0)