We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ensure_bytes
object
1 parent 7e5297b commit 1b180c5Copy full SHA for 1b180c5
numcodecs/tests/test_compat.py
@@ -51,6 +51,15 @@ def test_ensure_contiguous_ndarray_shares_memory():
51
assert np.shares_memory(a, memoryview(buf))
52
53
54
+def test_ensure_bytes_invalid_inputs():
55
+
56
+ # object array not allowed
57
+ a = np.array([u'Xin chào thế giới'], dtype=object)
58
+ for e in [a, memoryview(a)]:
59
+ with pytest.raises(TypeError):
60
+ ensure_bytes(e)
61
62
63
def test_ensure_contiguous_ndarray_invalid_inputs():
64
65
# object array not allowed
0 commit comments