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_ndarray
nbytes
1 parent 48582a5 commit 3ab36ebCopy full SHA for 3ab36eb
numcodecs/abc.py
@@ -30,7 +30,7 @@
30
31
"""
32
from __future__ import absolute_import, print_function, division
33
-from numcodecs.compat import handle_datetime
+from numcodecs.compat import ensure_ndarray
34
35
36
class Codec(object):
@@ -46,8 +46,7 @@ class Codec(object):
46
"""Maximum size of a buffer that can be encoded or decoded."""
47
48
def _check_buffer_size(self, buf):
49
- buf = handle_datetime(buf)
50
- bufsize = memoryview(buf).nbytes
+ bufsize = ensure_ndarray(buf).nbytes
51
if bufsize > self.max_buffer_size:
52
msg = "{} codec does not support buffers of > {} bytes".format(
53
self.codec_id, self.max_buffer_size)
0 commit comments