diff --git a/docs/release.rst b/docs/release.rst index 227678ba..e66484c9 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -1,6 +1,17 @@ Release notes ============= +.. _release_0.5.1: + +0.5.1 +----- + +* Fixed a compatibility issue with the Zlib codec to ensure it can handle + bytearray objects under Python 2.7 (:issue:`57`). +* Restricted the :class:`numcodecs.categorize.Categorize` codec to object + ('O') and unicode ('U') dtypes and disallowed bytes ('S') dtypes because + these do not round-trip through JSON configuration. + .. _release_0.5.0: 0.5.0 diff --git a/fixture/categorize/O/array.00.npy b/fixture/categorize/O/array.00.npy new file mode 100644 index 00000000..b5198e50 Binary files /dev/null and b/fixture/categorize/O/array.00.npy differ diff --git a/fixture/categorize/O/array.01.npy b/fixture/categorize/O/array.01.npy new file mode 100644 index 00000000..57872d90 Binary files /dev/null and b/fixture/categorize/O/array.01.npy differ diff --git a/fixture/categorize/O/array.02.npy b/fixture/categorize/O/array.02.npy new file mode 100644 index 00000000..206d160b Binary files /dev/null and b/fixture/categorize/O/array.02.npy differ diff --git a/fixture/categorize/O/array.03.npy b/fixture/categorize/O/array.03.npy new file mode 100644 index 00000000..3bc3d637 Binary files /dev/null and b/fixture/categorize/O/array.03.npy differ diff --git a/fixture/categorize/o/codec.00/config.json b/fixture/categorize/O/codec.00/config.json similarity index 100% rename from fixture/categorize/o/codec.00/config.json rename to fixture/categorize/O/codec.00/config.json diff --git a/fixture/categorize/O/codec.00/encoded.00.dat b/fixture/categorize/O/codec.00/encoded.00.dat new file mode 100644 index 00000000..13fc4047 --- /dev/null +++ b/fixture/categorize/O/codec.00/encoded.00.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fixture/categorize/O/codec.00/encoded.01.dat b/fixture/categorize/O/codec.00/encoded.01.dat new file mode 100644 index 00000000..b2431b18 --- /dev/null +++ b/fixture/categorize/O/codec.00/encoded.01.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fixture/categorize/O/codec.00/encoded.02.dat b/fixture/categorize/O/codec.00/encoded.02.dat new file mode 100644 index 00000000..824c94ec --- /dev/null +++ b/fixture/categorize/O/codec.00/encoded.02.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fixture/categorize/O/codec.00/encoded.03.dat b/fixture/categorize/O/codec.00/encoded.03.dat new file mode 100644 index 00000000..5356b9dc --- /dev/null +++ b/fixture/categorize/O/codec.00/encoded.03.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fixture/categorize/U/array.00.npy b/fixture/categorize/U/array.00.npy new file mode 100644 index 00000000..8b6605fe Binary files /dev/null and b/fixture/categorize/U/array.00.npy differ diff --git a/fixture/categorize/U/array.01.npy b/fixture/categorize/U/array.01.npy new file mode 100644 index 00000000..01bad14a Binary files /dev/null and b/fixture/categorize/U/array.01.npy differ diff --git a/fixture/categorize/u/array.02.npy b/fixture/categorize/U/array.02.npy similarity index 51% rename from fixture/categorize/u/array.02.npy rename to fixture/categorize/U/array.02.npy index f768942e..5990a141 100644 Binary files a/fixture/categorize/u/array.02.npy and b/fixture/categorize/U/array.02.npy differ diff --git a/fixture/categorize/u/array.03.npy b/fixture/categorize/U/array.03.npy similarity index 50% rename from fixture/categorize/u/array.03.npy rename to fixture/categorize/U/array.03.npy index 75ed1eda..186b7c84 100644 Binary files a/fixture/categorize/u/array.03.npy and b/fixture/categorize/U/array.03.npy differ diff --git a/fixture/categorize/u/codec.00/config.json b/fixture/categorize/U/codec.00/config.json similarity index 100% rename from fixture/categorize/u/codec.00/config.json rename to fixture/categorize/U/codec.00/config.json diff --git a/fixture/categorize/U/codec.00/encoded.00.dat b/fixture/categorize/U/codec.00/encoded.00.dat new file mode 100644 index 00000000..13fc4047 --- /dev/null +++ b/fixture/categorize/U/codec.00/encoded.00.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fixture/categorize/U/codec.00/encoded.01.dat b/fixture/categorize/U/codec.00/encoded.01.dat new file mode 100644 index 00000000..b2431b18 --- /dev/null +++ b/fixture/categorize/U/codec.00/encoded.01.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fixture/categorize/U/codec.00/encoded.02.dat b/fixture/categorize/U/codec.00/encoded.02.dat new file mode 100644 index 00000000..824c94ec --- /dev/null +++ b/fixture/categorize/U/codec.00/encoded.02.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fixture/categorize/U/codec.00/encoded.03.dat b/fixture/categorize/U/codec.00/encoded.03.dat new file mode 100644 index 00000000..5356b9dc --- /dev/null +++ b/fixture/categorize/U/codec.00/encoded.03.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fixture/categorize/n/array.00.npy b/fixture/categorize/n/array.00.npy deleted file mode 100644 index e43fa51e..00000000 Binary files a/fixture/categorize/n/array.00.npy and /dev/null differ diff --git a/fixture/categorize/n/array.01.npy b/fixture/categorize/n/array.01.npy deleted file mode 100644 index 3a0731ef..00000000 Binary files a/fixture/categorize/n/array.01.npy and /dev/null differ diff --git a/fixture/categorize/n/array.02.npy b/fixture/categorize/n/array.02.npy deleted file mode 100644 index 58b07208..00000000 Binary files a/fixture/categorize/n/array.02.npy and /dev/null differ diff --git a/fixture/categorize/n/array.03.npy b/fixture/categorize/n/array.03.npy deleted file mode 100644 index 14bb8576..00000000 Binary files a/fixture/categorize/n/array.03.npy and /dev/null differ diff --git a/fixture/categorize/n/codec.00/config.json b/fixture/categorize/n/codec.00/config.json deleted file mode 100644 index 758aa33e..00000000 --- a/fixture/categorize/n/codec.00/config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "astype": "|u1", - "dtype": ">> import numcodecs >>> import numpy as np - >>> x = np.array([b'male', b'female', b'female', b'male', b'unexpected']) + >>> x = np.array(['male', 'female', 'female', 'male', 'unexpected'], dtype=object) >>> x - array([b'male', b'female', b'female', b'male', b'unexpected'], - dtype='|S10') - >>> codec = numcodecs.Categorize(labels=[b'female', b'male'], dtype=x.dtype) + array(['male', 'female', 'female', 'male', 'unexpected'], + dtype=object) + >>> codec = numcodecs.Categorize(labels=['female', 'male'], dtype=object) >>> y = codec.encode(x) >>> y array([2, 1, 1, 2, 0], dtype=uint8) >>> z = codec.decode(y) >>> z - array([b'male', b'female', b'female', b'male', b''], - dtype='|S10') + array(['male', 'female', 'female', 'male', ''], + dtype=object) """ @@ -44,12 +44,10 @@ class Categorize(Codec): def __init__(self, labels, dtype, astype='u1'): self.dtype = np.dtype(dtype) - if self.dtype.kind == 'S': - self.labels = [ensure_bytes(l) for l in labels] - elif self.dtype.kind == 'U': - self.labels = [ensure_text(l) for l in labels] - else: - self.labels = labels + if self.dtype.kind not in 'UO': + raise ValueError("only unicode ('U') and object ('O') dtypes are " + "supported") + self.labels = [ensure_text(l) for l in labels] self.astype = np.dtype(astype) def encode(self, buf): @@ -77,7 +75,7 @@ def decode(self, buf, out=None): dec = out.reshape(-1, order='A') copy_needed = False else: - dec = np.zeros_like(enc, dtype=self.dtype) + dec = np.full_like(enc, fill_value=u'', dtype=self.dtype) copy_needed = True # apply decoding @@ -91,13 +89,9 @@ def decode(self, buf, out=None): return dec def get_config(self): - if self.dtype.kind == 'S': - labels = [ensure_text(l) for l in self.labels] - else: - labels = self.labels config = dict( id=self.codec_id, - labels=labels, + labels=self.labels, dtype=self.dtype.str, astype=self.astype.str ) diff --git a/numcodecs/compat.py b/numcodecs/compat.py index 0e7736d8..f3b6e95c 100644 --- a/numcodecs/compat.py +++ b/numcodecs/compat.py @@ -85,17 +85,6 @@ def buffer_copy(buf, out=None): return out -# def buffer_size(v): -# from array import array as _stdlib_array -# if PY2 and isinstance(v, _stdlib_array): # pragma: no cover -# # special case array.array because does not support buffer -# # interface in PY2 -# return v.buffer_info()[1] * v.itemsize -# else: -# v = memoryview(v) -# return reduce(operator.mul, v.shape) * v.itemsize - - def ndarray_from_buffer(buf, dtype): if isinstance(buf, np.ndarray): arr = buf.reshape(-1, order='A').view(dtype) @@ -104,17 +93,10 @@ def ndarray_from_buffer(buf, dtype): return arr -def ensure_bytes(l, encoding='utf-8'): - if isinstance(l, binary_type): - return l - else: - return l.encode(encoding=encoding) - - def ensure_text(l, encoding='utf-8'): if isinstance(l, text_type): return l - else: + else: # pragma: py3 no cover return text_type(l, encoding=encoding) diff --git a/numcodecs/compat_ext.c b/numcodecs/compat_ext.c index 9a67c220..b996f1ad 100644 --- a/numcodecs/compat_ext.c +++ b/numcodecs/compat_ext.c @@ -745,10 +745,10 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "numcodecs/compat_ext.pyx", "stringsource", - "array.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", + ".tox/py36/lib/python3.6/site-packages/Cython/Includes/cpython/array.pxd", + ".tox/py36/lib/python3.6/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/py36/lib/python3.6/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/py36/lib/python3.6/site-packages/Cython/Includes/cpython/complex.pxd", }; /*--- Type declarations ---*/ diff --git a/numcodecs/lz4.c b/numcodecs/lz4.c index b09ab56d..1fb28c47 100644 --- a/numcodecs/lz4.c +++ b/numcodecs/lz4.c @@ -755,10 +755,10 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "numcodecs/lz4.pyx", - "array.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", + ".tox/py36/lib/python3.6/site-packages/Cython/Includes/cpython/array.pxd", + ".tox/py36/lib/python3.6/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/py36/lib/python3.6/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/py36/lib/python3.6/site-packages/Cython/Includes/cpython/complex.pxd", "numcodecs/compat_ext.pxd", }; /* NoFastGil.proto */ diff --git a/numcodecs/tests/common.py b/numcodecs/tests/common.py index b902a23f..2933e876 100644 --- a/numcodecs/tests/common.py +++ b/numcodecs/tests/common.py @@ -62,12 +62,18 @@ def check_encode_decode(arr, codec, precision=None): dec = codec.decode(enc) compare_arrays(arr, dec, precision=precision) - # test encoding of raw bytes + # test encoding of bytes buf = arr.tobytes(order='A') enc = codec.encode(buf) dec = codec.decode(enc) compare_arrays(arr, dec, precision=precision) + # test encoding of bytearray + buf = bytearray(arr.tobytes(order='A')) + enc = codec.encode(buf) + dec = codec.decode(enc) + compare_arrays(arr, dec, precision=precision) + # test encoding of array.array buf = array.array('b', arr.tobytes(order='A')) enc = codec.encode(buf) @@ -84,6 +90,10 @@ def check_encode_decode(arr, codec, precision=None): dec = codec.decode(enc_bytes) compare_arrays(arr, dec, precision=precision) + # test decoding of bytearray + dec = codec.decode(bytearray(enc_bytes)) + compare_arrays(arr, dec, precision=precision) + # test decoding of array.array buf = array.array('b', enc_bytes) dec = codec.decode(buf) diff --git a/numcodecs/tests/test_categorize.py b/numcodecs/tests/test_categorize.py index ff4a0707..b44d2938 100644 --- a/numcodecs/tests/test_categorize.py +++ b/numcodecs/tests/test_categorize.py @@ -4,7 +4,7 @@ import numpy as np from numpy.testing import assert_array_equal -from nose.tools import eq_ as eq +from nose.tools import assert_raises from numcodecs.categorize import Categorize @@ -13,130 +13,92 @@ from numcodecs.compat import PY2 -labels = [b'foo', b'bar', b'baz', b'quux'] -labels_u = [u'ƒöõ', u'ßàř', u'ßāẑ', u'ƪùüx'] -labels_num = [1000000, 2000000, 3000000] +labels = [u'ƒöõ', u'ßàř', u'ßāẑ', u'ƪùüx'] arrays = [ np.random.choice(labels, size=1000), np.random.choice(labels, size=(100, 10)), np.random.choice(labels, size=(10, 10, 10)), np.random.choice(labels, size=1000).reshape(100, 10, order='F'), ] -arrays_u = [ - np.random.choice(labels_u, size=1000), - np.random.choice(labels_u, size=(100, 10)), - np.random.choice(labels_u, size=(10, 10, 10)), - np.random.choice(labels_u, size=1000).reshape(100, 10, order='F'), -] -arrays_num = [ - np.random.choice(labels_num, size=1000).astype('i8'), - np.random.choice(labels_num, size=(100, 10)).astype('i8'), - np.random.choice(labels_num, size=(10, 10, 10)).astype('i8'), - np.random.choice(labels_num, size=1000).reshape(100, 10, order='F').astype('i8'), -] -arrays_object = [a.astype(object) for a in arrays_u] +arrays_object = [a.astype(object) for a in arrays] def test_encode_decode(): - # string dtype + # unicode dtype for arr in arrays: codec = Categorize(labels, dtype=arr.dtype) check_encode_decode(arr, codec) - # unicode dtype - for arr in arrays_u: - codec = Categorize(labels_u, dtype=arr.dtype) - check_encode_decode(arr, codec) - - # numeric dtype - for arr in arrays_num: - codec = Categorize(labels_num, dtype=arr.dtype) - check_encode_decode(arr, codec) - # object dtype for arr in arrays_object: - codec = Categorize(labels_u, dtype=arr.dtype) - # can't do the full check because can only accept object array for encoding + codec = Categorize(labels, dtype=arr.dtype) + # can't do the full check because can only accept object array for + # encoding enc = codec.encode(arr) dec = codec.decode(enc) compare_arrays(arr, dec) def test_encode(): - arr = np.array([b'foo', b'bar', b'foo', b'baz', b'quux']) - # miss off quux - codec = Categorize(labels=labels[:-1], dtype=arr.dtype, astype='u1') - - # test encoding - expect = np.array([1, 2, 1, 3, 0], dtype='u1') - enc = codec.encode(arr) - assert_array_equal(expect, enc) - eq(expect.dtype, enc.dtype) - - # test decoding with unexpected value - dec = codec.decode(enc) - expect = arr.copy() - expect[expect == b'quux'] = b'' - assert_array_equal(expect, dec) - eq(arr.dtype, dec.dtype) - - -def test_encode_unicode(): - arr = np.array([u'ƒöõ', u'ßàř', u'ƒöõ', u'ßāẑ', u'ƪùüx']) - # miss off quux - codec = Categorize(labels=labels_u[:-1], dtype=arr.dtype, astype='u1') - - # test encoding - expect = np.array([1, 2, 1, 3, 0], dtype='u1') - enc = codec.encode(arr) - assert_array_equal(expect, enc) - eq(expect.dtype, enc.dtype) - - # test decoding with unexpected value - dec = codec.decode(enc) - expect = arr.copy() - expect[expect == u'ƪùüx'] = u'' - assert_array_equal(expect, dec) - eq(arr.dtype, dec.dtype) + for dtype in 'U', object: + + arr = np.array([u'ƒöõ', u'ßàř', u'ƒöõ', u'ßāẑ', u'ƪùüx'], dtype=dtype) + # miss off quux + codec = Categorize(labels=labels[:-1], dtype=arr.dtype, astype='u1') + + # test encoding + expect = np.array([1, 2, 1, 3, 0], dtype='u1') + enc = codec.encode(arr) + assert_array_equal(expect, enc) + assert expect.dtype == enc.dtype + + # test decoding with unexpected value + dec = codec.decode(enc) + expect = arr.copy() + expect[expect == u'ƪùüx'] = u'' + assert_array_equal(expect, dec) + assert arr.dtype == dec.dtype def test_config(): - codec = Categorize(labels=labels, dtype='S4') - check_config(codec) - codec = Categorize(labels=labels_u, dtype='U4') + codec = Categorize(labels=labels, dtype='U4') check_config(codec) def test_repr(): - dtype = '|S5' + dtype = ' 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "check_out_param") < 0)) __PYX_ERR(0, 38, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "check_out_param") < 0)) __PYX_ERR(0, 37, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -2495,7 +2495,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_1check_out_param(PyObject *__pyx_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("check_out_param", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 38, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("check_out_param", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 37, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("numcodecs.vlen.check_out_param", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2519,37 +2519,37 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_check_out_param(CYTHON_UNUSED PyObjec __Pyx_RefNannySetupContext("check_out_param", 0); __Pyx_INCREF(__pyx_v_out); - /* "numcodecs/vlen.pyx":39 + /* "numcodecs/vlen.pyx":38 * * def check_out_param(out, n_items): * if not isinstance(out, np.ndarray): # <<<<<<<<<<<<<< * raise TypeError('out must be 1-dimensional array') * if out.dtype != object: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = PyObject_IsInstance(__pyx_v_out, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_out, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { - /* "numcodecs/vlen.pyx":40 + /* "numcodecs/vlen.pyx":39 * def check_out_param(out, n_items): * if not isinstance(out, np.ndarray): * raise TypeError('out must be 1-dimensional array') # <<<<<<<<<<<<<< * if out.dtype != object: * raise ValueError('out must be object array') */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 40, __pyx_L1_error) + __PYX_ERR(0, 39, __pyx_L1_error) - /* "numcodecs/vlen.pyx":39 + /* "numcodecs/vlen.pyx":38 * * def check_out_param(out, n_items): * if not isinstance(out, np.ndarray): # <<<<<<<<<<<<<< @@ -2558,35 +2558,35 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_check_out_param(CYTHON_UNUSED PyObjec */ } - /* "numcodecs/vlen.pyx":41 + /* "numcodecs/vlen.pyx":40 * if not isinstance(out, np.ndarray): * raise TypeError('out must be 1-dimensional array') * if out.dtype != object: # <<<<<<<<<<<<<< * raise ValueError('out must be object array') * out = out.reshape(-1, order='A') */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_builtin_object, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_builtin_object, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "numcodecs/vlen.pyx":42 + /* "numcodecs/vlen.pyx":41 * raise TypeError('out must be 1-dimensional array') * if out.dtype != object: * raise ValueError('out must be object array') # <<<<<<<<<<<<<< * out = out.reshape(-1, order='A') * if out.shape[0] < n_items: */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 42, __pyx_L1_error) + __PYX_ERR(0, 41, __pyx_L1_error) - /* "numcodecs/vlen.pyx":41 + /* "numcodecs/vlen.pyx":40 * if not isinstance(out, np.ndarray): * raise TypeError('out must be 1-dimensional array') * if out.dtype != object: # <<<<<<<<<<<<<< @@ -2595,57 +2595,57 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_check_out_param(CYTHON_UNUSED PyObjec */ } - /* "numcodecs/vlen.pyx":43 + /* "numcodecs/vlen.pyx":42 * if out.dtype != object: * raise ValueError('out must be object array') * out = out.reshape(-1, order='A') # <<<<<<<<<<<<<< * if out.shape[0] < n_items: * raise ValueError('out is too small') */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_s_A) < 0) __PYX_ERR(0, 43, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_s_A) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_5); __pyx_t_5 = 0; - /* "numcodecs/vlen.pyx":44 + /* "numcodecs/vlen.pyx":43 * raise ValueError('out must be object array') * out = out.reshape(-1, order='A') * if out.shape[0] < n_items: # <<<<<<<<<<<<<< * raise ValueError('out is too small') * return out */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_v_n_items, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_v_n_items, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - /* "numcodecs/vlen.pyx":45 + /* "numcodecs/vlen.pyx":44 * out = out.reshape(-1, order='A') * if out.shape[0] < n_items: * raise ValueError('out is too small') # <<<<<<<<<<<<<< * return out * */ - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 45, __pyx_L1_error) + __PYX_ERR(0, 44, __pyx_L1_error) - /* "numcodecs/vlen.pyx":44 + /* "numcodecs/vlen.pyx":43 * raise ValueError('out must be object array') * out = out.reshape(-1, order='A') * if out.shape[0] < n_items: # <<<<<<<<<<<<<< @@ -2654,7 +2654,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_check_out_param(CYTHON_UNUSED PyObjec */ } - /* "numcodecs/vlen.pyx":46 + /* "numcodecs/vlen.pyx":45 * if out.shape[0] < n_items: * raise ValueError('out is too small') * return out # <<<<<<<<<<<<<< @@ -2666,7 +2666,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_check_out_param(CYTHON_UNUSED PyObjec __pyx_r = __pyx_v_out; goto __pyx_L0; - /* "numcodecs/vlen.pyx":38 + /* "numcodecs/vlen.pyx":37 * * * def check_out_param(out, n_items): # <<<<<<<<<<<<<< @@ -2688,7 +2688,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_check_out_param(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "numcodecs/vlen.pyx":73 +/* "numcodecs/vlen.pyx":72 * codec_id = 'vlen-utf8' * * def __init__(self): # <<<<<<<<<<<<<< @@ -2723,7 +2723,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8___init__(CYTHON_UNUSED PyOb return __pyx_r; } -/* "numcodecs/vlen.pyx":78 +/* "numcodecs/vlen.pyx":77 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< @@ -2764,11 +2764,11 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_8VLenUTF8_3encode(PyObject *__pyx_sel case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 78, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 77, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 78, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 77, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -2781,7 +2781,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_8VLenUTF8_3encode(PyObject *__pyx_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 78, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 77, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("numcodecs.vlen.VLenUTF8.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2828,49 +2828,49 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj Py_ssize_t __pyx_t_16; __Pyx_RefNannySetupContext("encode", 0); - /* "numcodecs/vlen.pyx":91 + /* "numcodecs/vlen.pyx":90 * * # normalise input * input_values = np.asanyarray(buf, dtype=object).reshape(-1, order='A') # <<<<<<<<<<<<<< * * # determine number of items */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asanyarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asanyarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_buf); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 91, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_A) < 0) __PYX_ERR(0, 91, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_A) < 0) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_object(__pyx_t_1); - if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 91, __pyx_L1_error) + if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_input_values = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "numcodecs/vlen.pyx":94 + /* "numcodecs/vlen.pyx":93 * * # determine number of items * n_items = input_values.shape[0] # <<<<<<<<<<<<<< @@ -2879,81 +2879,81 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ __pyx_v_n_items = (__pyx_v_input_values.shape[0]); - /* "numcodecs/vlen.pyx":97 + /* "numcodecs/vlen.pyx":96 * * # setup intermediates * encoded_values = np.empty(n_items, dtype=object) # <<<<<<<<<<<<<< * encoded_lengths = np.empty(n_items, dtype=np.intc) * */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 97, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_object(__pyx_t_2); - if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_encoded_values = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "numcodecs/vlen.pyx":98 + /* "numcodecs/vlen.pyx":97 * # setup intermediates * encoded_values = np.empty(n_items, dtype=object) * encoded_lengths = np.empty(n_items, dtype=np.intc) # <<<<<<<<<<<<<< * * # first iteration to convert to bytes */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_intc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_intc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_6); - if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 98, __pyx_L1_error) + if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_encoded_lengths = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "numcodecs/vlen.pyx":101 + /* "numcodecs/vlen.pyx":100 * * # first iteration to convert to bytes * data_length = 0 # <<<<<<<<<<<<<< @@ -2962,7 +2962,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ __pyx_v_data_length = 0; - /* "numcodecs/vlen.pyx":102 + /* "numcodecs/vlen.pyx":101 * # first iteration to convert to bytes * data_length = 0 * for i in range(n_items): # <<<<<<<<<<<<<< @@ -2973,7 +2973,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "numcodecs/vlen.pyx":103 + /* "numcodecs/vlen.pyx":102 * data_length = 0 * for i in range(n_items): * u = input_values[i] # <<<<<<<<<<<<<< @@ -2986,7 +2986,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj __Pyx_XDECREF_SET(__pyx_v_u, __pyx_t_6); __pyx_t_6 = 0; - /* "numcodecs/vlen.pyx":104 + /* "numcodecs/vlen.pyx":103 * for i in range(n_items): * u = input_values[i] * if not PyUnicode_Check(u): # <<<<<<<<<<<<<< @@ -2996,28 +2996,28 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj __pyx_t_11 = ((!(PyUnicode_Check(__pyx_v_u) != 0)) != 0); if (__pyx_t_11) { - /* "numcodecs/vlen.pyx":105 + /* "numcodecs/vlen.pyx":104 * u = input_values[i] * if not PyUnicode_Check(u): * raise TypeError('expected unicode string, found %r' % u) # <<<<<<<<<<<<<< * b = PyUnicode_AsUTF8String(u) * l = PyBytes_GET_SIZE(b) */ - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_expected_unicode_string_found_r, __pyx_v_u); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_expected_unicode_string_found_r, __pyx_v_u); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 105, __pyx_L1_error) + __PYX_ERR(0, 104, __pyx_L1_error) - /* "numcodecs/vlen.pyx":104 + /* "numcodecs/vlen.pyx":103 * for i in range(n_items): * u = input_values[i] * if not PyUnicode_Check(u): # <<<<<<<<<<<<<< @@ -3026,19 +3026,19 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ } - /* "numcodecs/vlen.pyx":106 + /* "numcodecs/vlen.pyx":105 * if not PyUnicode_Check(u): * raise TypeError('expected unicode string, found %r' % u) * b = PyUnicode_AsUTF8String(u) # <<<<<<<<<<<<<< * l = PyBytes_GET_SIZE(b) * encoded_values[i] = b */ - __pyx_t_6 = PyUnicode_AsUTF8String(__pyx_v_u); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_6 = PyUnicode_AsUTF8String(__pyx_v_u); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_b, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "numcodecs/vlen.pyx":107 + /* "numcodecs/vlen.pyx":106 * raise TypeError('expected unicode string, found %r' % u) * b = PyUnicode_AsUTF8String(u) * l = PyBytes_GET_SIZE(b) # <<<<<<<<<<<<<< @@ -3047,7 +3047,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ __pyx_v_l = PyBytes_GET_SIZE(__pyx_v_b); - /* "numcodecs/vlen.pyx":108 + /* "numcodecs/vlen.pyx":107 * b = PyUnicode_AsUTF8String(u) * l = PyBytes_GET_SIZE(b) * encoded_values[i] = b # <<<<<<<<<<<<<< @@ -3061,7 +3061,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj *__pyx_t_13 = __pyx_v_b; __Pyx_GIVEREF(*__pyx_t_13); - /* "numcodecs/vlen.pyx":109 + /* "numcodecs/vlen.pyx":108 * l = PyBytes_GET_SIZE(b) * encoded_values[i] = b * data_length += l + 4 # 4 bytes to store item length # <<<<<<<<<<<<<< @@ -3070,7 +3070,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ __pyx_v_data_length = (__pyx_v_data_length + (__pyx_v_l + 4)); - /* "numcodecs/vlen.pyx":110 + /* "numcodecs/vlen.pyx":109 * encoded_values[i] = b * data_length += l + 4 # 4 bytes to store item length * encoded_lengths[i] = l # <<<<<<<<<<<<<< @@ -3081,7 +3081,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj *((int *) ( /* dim=0 */ (__pyx_v_encoded_lengths.data + __pyx_t_14 * __pyx_v_encoded_lengths.strides[0]) )) = __pyx_v_l; } - /* "numcodecs/vlen.pyx":113 + /* "numcodecs/vlen.pyx":112 * * # setup output * total_length = HEADER_LENGTH + data_length # <<<<<<<<<<<<<< @@ -3090,19 +3090,19 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ __pyx_v_total_length = (__pyx_v_9numcodecs_4vlen_HEADER_LENGTH + __pyx_v_data_length); - /* "numcodecs/vlen.pyx":114 + /* "numcodecs/vlen.pyx":113 * # setup output * total_length = HEADER_LENGTH + data_length * out = PyByteArray_FromStringAndSize(NULL, total_length) # <<<<<<<<<<<<<< * * # write header */ - __pyx_t_6 = PyByteArray_FromStringAndSize(NULL, __pyx_v_total_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_6 = PyByteArray_FromStringAndSize(NULL, __pyx_v_total_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_out = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "numcodecs/vlen.pyx":117 + /* "numcodecs/vlen.pyx":116 * * # write header * data = PyByteArray_AS_STRING(out) # <<<<<<<<<<<<<< @@ -3111,7 +3111,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ __pyx_v_data = PyByteArray_AS_STRING(__pyx_v_out); - /* "numcodecs/vlen.pyx":118 + /* "numcodecs/vlen.pyx":117 * # write header * data = PyByteArray_AS_STRING(out) * store_le32(data, n_items) # <<<<<<<<<<<<<< @@ -3120,7 +3120,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ store_le32(__pyx_v_data, __pyx_v_n_items); - /* "numcodecs/vlen.pyx":121 + /* "numcodecs/vlen.pyx":120 * * # second iteration, store data * data += HEADER_LENGTH # <<<<<<<<<<<<<< @@ -3129,7 +3129,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ __pyx_v_data = (__pyx_v_data + __pyx_v_9numcodecs_4vlen_HEADER_LENGTH); - /* "numcodecs/vlen.pyx":122 + /* "numcodecs/vlen.pyx":121 * # second iteration, store data * data += HEADER_LENGTH * for i in range(n_items): # <<<<<<<<<<<<<< @@ -3140,7 +3140,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "numcodecs/vlen.pyx":123 + /* "numcodecs/vlen.pyx":122 * data += HEADER_LENGTH * for i in range(n_items): * l = encoded_lengths[i] # <<<<<<<<<<<<<< @@ -3150,7 +3150,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj __pyx_t_15 = __pyx_v_i; __pyx_v_l = (*((int *) ( /* dim=0 */ (__pyx_v_encoded_lengths.data + __pyx_t_15 * __pyx_v_encoded_lengths.strides[0]) ))); - /* "numcodecs/vlen.pyx":124 + /* "numcodecs/vlen.pyx":123 * for i in range(n_items): * l = encoded_lengths[i] * store_le32(data, l) # <<<<<<<<<<<<<< @@ -3159,7 +3159,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ store_le32(__pyx_v_data, __pyx_v_l); - /* "numcodecs/vlen.pyx":125 + /* "numcodecs/vlen.pyx":124 * l = encoded_lengths[i] * store_le32(data, l) * data += 4 # <<<<<<<<<<<<<< @@ -3168,7 +3168,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ __pyx_v_data = (__pyx_v_data + 4); - /* "numcodecs/vlen.pyx":126 + /* "numcodecs/vlen.pyx":125 * store_le32(data, l) * data += 4 * encv = PyBytes_AS_STRING(encoded_values[i]) # <<<<<<<<<<<<<< @@ -3181,7 +3181,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj __pyx_v_encv = PyBytes_AS_STRING(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "numcodecs/vlen.pyx":127 + /* "numcodecs/vlen.pyx":126 * data += 4 * encv = PyBytes_AS_STRING(encoded_values[i]) * memcpy(data, encv, l) # <<<<<<<<<<<<<< @@ -3190,7 +3190,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj */ memcpy(__pyx_v_data, __pyx_v_encv, __pyx_v_l); - /* "numcodecs/vlen.pyx":128 + /* "numcodecs/vlen.pyx":127 * encv = PyBytes_AS_STRING(encoded_values[i]) * memcpy(data, encv, l) * data += l # <<<<<<<<<<<<<< @@ -3200,7 +3200,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj __pyx_v_data = (__pyx_v_data + __pyx_v_l); } - /* "numcodecs/vlen.pyx":130 + /* "numcodecs/vlen.pyx":129 * data += l * * return out # <<<<<<<<<<<<<< @@ -3212,7 +3212,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj __pyx_r = __pyx_v_out; goto __pyx_L0; - /* "numcodecs/vlen.pyx":78 + /* "numcodecs/vlen.pyx":77 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< @@ -3243,7 +3243,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_2encode(CYTHON_UNUSED PyObj return __pyx_r; } -/* "numcodecs/vlen.pyx":134 +/* "numcodecs/vlen.pyx":133 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< @@ -3288,7 +3288,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_8VLenUTF8_5decode(PyObject *__pyx_sel case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, 1); __PYX_ERR(0, 134, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, 1); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -3298,7 +3298,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_8VLenUTF8_5decode(PyObject *__pyx_sel } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode") < 0)) __PYX_ERR(0, 134, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode") < 0)) __PYX_ERR(0, 133, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3316,7 +3316,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_8VLenUTF8_5decode(PyObject *__pyx_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 134, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 133, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("numcodecs.vlen.VLenUTF8.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3354,16 +3354,16 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __Pyx_RefNannySetupContext("decode", 0); __Pyx_INCREF(__pyx_v_out); - /* "numcodecs/vlen.pyx":142 + /* "numcodecs/vlen.pyx":141 * * # accept any buffer * input_buffer = Buffer(buf, PyBUF_ANY_CONTIGUOUS) # <<<<<<<<<<<<<< * input_length = input_buffer.nbytes * */ - __pyx_t_1 = __Pyx_PyInt_From_int(PyBUF_ANY_CONTIGUOUS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(PyBUF_ANY_CONTIGUOUS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); @@ -3371,13 +3371,13 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9numcodecs_10compat_ext_Buffer), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9numcodecs_10compat_ext_Buffer), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_input_buffer = ((struct __pyx_obj_9numcodecs_10compat_ext_Buffer *)__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":143 + /* "numcodecs/vlen.pyx":142 * # accept any buffer * input_buffer = Buffer(buf, PyBUF_ANY_CONTIGUOUS) * input_length = input_buffer.nbytes # <<<<<<<<<<<<<< @@ -3387,7 +3387,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __pyx_t_3 = __pyx_v_input_buffer->nbytes; __pyx_v_input_length = __pyx_t_3; - /* "numcodecs/vlen.pyx":146 + /* "numcodecs/vlen.pyx":145 * * # sanity checks * if input_length < HEADER_LENGTH: # <<<<<<<<<<<<<< @@ -3397,20 +3397,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __pyx_t_4 = ((__pyx_v_input_length < __pyx_v_9numcodecs_4vlen_HEADER_LENGTH) != 0); if (__pyx_t_4) { - /* "numcodecs/vlen.pyx":147 + /* "numcodecs/vlen.pyx":146 * # sanity checks * if input_length < HEADER_LENGTH: * raise ValueError('corrupt buffer, missing or truncated header') # <<<<<<<<<<<<<< * * # obtain input data pointer */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 147, __pyx_L1_error) + __PYX_ERR(0, 146, __pyx_L1_error) - /* "numcodecs/vlen.pyx":146 + /* "numcodecs/vlen.pyx":145 * * # sanity checks * if input_length < HEADER_LENGTH: # <<<<<<<<<<<<<< @@ -3419,7 +3419,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj */ } - /* "numcodecs/vlen.pyx":150 + /* "numcodecs/vlen.pyx":149 * * # obtain input data pointer * data = input_buffer.ptr # <<<<<<<<<<<<<< @@ -3429,7 +3429,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __pyx_t_5 = __pyx_v_input_buffer->ptr; __pyx_v_data = __pyx_t_5; - /* "numcodecs/vlen.pyx":151 + /* "numcodecs/vlen.pyx":150 * # obtain input data pointer * data = input_buffer.ptr * data_end = data + input_length # <<<<<<<<<<<<<< @@ -3438,7 +3438,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj */ __pyx_v_data_end = (__pyx_v_data + __pyx_v_input_length); - /* "numcodecs/vlen.pyx":154 + /* "numcodecs/vlen.pyx":153 * * # load number of items * n_items = load_le32(data) # <<<<<<<<<<<<<< @@ -3447,7 +3447,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj */ __pyx_v_n_items = load_le32(__pyx_v_data); - /* "numcodecs/vlen.pyx":157 + /* "numcodecs/vlen.pyx":156 * * # setup output * if out is not None: # <<<<<<<<<<<<<< @@ -3458,16 +3458,16 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __pyx_t_6 = (__pyx_t_4 != 0); if (__pyx_t_6) { - /* "numcodecs/vlen.pyx":158 + /* "numcodecs/vlen.pyx":157 * # setup output * if out is not None: * out = check_out_param(out, n_items) # <<<<<<<<<<<<<< * else: * out = np.empty(n_items, dtype=object) */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_out_param); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_out_param); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -3484,7 +3484,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_out, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -3493,14 +3493,14 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_out, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -3511,7 +3511,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -3519,7 +3519,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":157 + /* "numcodecs/vlen.pyx":156 * * # setup output * if out is not None: # <<<<<<<<<<<<<< @@ -3529,7 +3529,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj goto __pyx_L4; } - /* "numcodecs/vlen.pyx":160 + /* "numcodecs/vlen.pyx":159 * out = check_out_param(out, n_items) * else: * out = np.empty(n_items, dtype=object) # <<<<<<<<<<<<<< @@ -3537,22 +3537,22 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj * # iterate and decode - N.B., do not try to cast `out` as object[:] */ /*else*/ { - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 160, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -3562,7 +3562,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj } __pyx_L4:; - /* "numcodecs/vlen.pyx":165 + /* "numcodecs/vlen.pyx":164 * # as this causes segfaults, possibly similar to * # https://github.com/cython/cython/issues/1608 * data += HEADER_LENGTH # <<<<<<<<<<<<<< @@ -3571,7 +3571,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj */ __pyx_v_data = (__pyx_v_data + __pyx_v_9numcodecs_4vlen_HEADER_LENGTH); - /* "numcodecs/vlen.pyx":166 + /* "numcodecs/vlen.pyx":165 * # https://github.com/cython/cython/issues/1608 * data += HEADER_LENGTH * for i in range(n_items): # <<<<<<<<<<<<<< @@ -3582,7 +3582,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; - /* "numcodecs/vlen.pyx":167 + /* "numcodecs/vlen.pyx":166 * data += HEADER_LENGTH * for i in range(n_items): * if data + 4 > data_end: # <<<<<<<<<<<<<< @@ -3592,20 +3592,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __pyx_t_6 = (((__pyx_v_data + 4) > __pyx_v_data_end) != 0); if (__pyx_t_6) { - /* "numcodecs/vlen.pyx":168 + /* "numcodecs/vlen.pyx":167 * for i in range(n_items): * if data + 4 > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * l = load_le32(data) * data += 4 */ - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 168, __pyx_L1_error) + __PYX_ERR(0, 167, __pyx_L1_error) - /* "numcodecs/vlen.pyx":167 + /* "numcodecs/vlen.pyx":166 * data += HEADER_LENGTH * for i in range(n_items): * if data + 4 > data_end: # <<<<<<<<<<<<<< @@ -3614,7 +3614,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj */ } - /* "numcodecs/vlen.pyx":169 + /* "numcodecs/vlen.pyx":168 * if data + 4 > data_end: * raise ValueError('corrupt buffer, data seem truncated') * l = load_le32(data) # <<<<<<<<<<<<<< @@ -3623,7 +3623,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj */ __pyx_v_l = load_le32(__pyx_v_data); - /* "numcodecs/vlen.pyx":170 + /* "numcodecs/vlen.pyx":169 * raise ValueError('corrupt buffer, data seem truncated') * l = load_le32(data) * data += 4 # <<<<<<<<<<<<<< @@ -3632,7 +3632,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj */ __pyx_v_data = (__pyx_v_data + 4); - /* "numcodecs/vlen.pyx":171 + /* "numcodecs/vlen.pyx":170 * l = load_le32(data) * data += 4 * if data + l > data_end: # <<<<<<<<<<<<<< @@ -3642,20 +3642,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __pyx_t_6 = (((__pyx_v_data + __pyx_v_l) > __pyx_v_data_end) != 0); if (__pyx_t_6) { - /* "numcodecs/vlen.pyx":172 + /* "numcodecs/vlen.pyx":171 * data += 4 * if data + l > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * out[i] = PyUnicode_FromStringAndSize(data, l) * data += l */ - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 172, __pyx_L1_error) + __PYX_ERR(0, 171, __pyx_L1_error) - /* "numcodecs/vlen.pyx":171 + /* "numcodecs/vlen.pyx":170 * l = load_le32(data) * data += 4 * if data + l > data_end: # <<<<<<<<<<<<<< @@ -3664,19 +3664,19 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj */ } - /* "numcodecs/vlen.pyx":173 + /* "numcodecs/vlen.pyx":172 * if data + l > data_end: * raise ValueError('corrupt buffer, data seem truncated') * out[i] = PyUnicode_FromStringAndSize(data, l) # <<<<<<<<<<<<<< * data += l * */ - __pyx_t_7 = PyUnicode_FromStringAndSize(__pyx_v_data, __pyx_v_l); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_7 = PyUnicode_FromStringAndSize(__pyx_v_data, __pyx_v_l); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely(__Pyx_SetItemInt(__pyx_v_out, __pyx_v_i, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0) < 0)) __PYX_ERR(0, 173, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_out, __pyx_v_i, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0) < 0)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "numcodecs/vlen.pyx":174 + /* "numcodecs/vlen.pyx":173 * raise ValueError('corrupt buffer, data seem truncated') * out[i] = PyUnicode_FromStringAndSize(data, l) * data += l # <<<<<<<<<<<<<< @@ -3686,7 +3686,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __pyx_v_data = (__pyx_v_data + __pyx_v_l); } - /* "numcodecs/vlen.pyx":176 + /* "numcodecs/vlen.pyx":175 * data += l * * return out # <<<<<<<<<<<<<< @@ -3698,7 +3698,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj __pyx_r = __pyx_v_out; goto __pyx_L0; - /* "numcodecs/vlen.pyx":134 + /* "numcodecs/vlen.pyx":133 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< @@ -3723,7 +3723,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_8VLenUTF8_4decode(CYTHON_UNUSED PyObj return __pyx_r; } -/* "numcodecs/vlen.pyx":203 +/* "numcodecs/vlen.pyx":202 * codec_id = 'vlen-bytes' * * def __init__(self): # <<<<<<<<<<<<<< @@ -3758,7 +3758,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes___init__(CYTHON_UNUSED PyO return __pyx_r; } -/* "numcodecs/vlen.pyx":208 +/* "numcodecs/vlen.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< @@ -3799,11 +3799,11 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenBytes_3encode(PyObject *__pyx_se case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 208, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 207, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 208, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 207, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3816,7 +3816,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenBytes_3encode(PyObject *__pyx_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 208, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 207, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("numcodecs.vlen.VLenBytes.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3859,49 +3859,49 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb Py_ssize_t __pyx_t_14; __Pyx_RefNannySetupContext("encode", 0); - /* "numcodecs/vlen.pyx":219 + /* "numcodecs/vlen.pyx":218 * * # normalise input * values = np.asanyarray(buf, dtype=object).reshape(-1, order='A') # <<<<<<<<<<<<<< * * # determine number of items */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asanyarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asanyarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_buf); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 219, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_A) < 0) __PYX_ERR(0, 219, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_A) < 0) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_object(__pyx_t_1); - if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 219, __pyx_L1_error) + if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_values = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "numcodecs/vlen.pyx":222 + /* "numcodecs/vlen.pyx":221 * * # determine number of items * n_items = values.shape[0] # <<<<<<<<<<<<<< @@ -3910,47 +3910,47 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ __pyx_v_n_items = (__pyx_v_values.shape[0]); - /* "numcodecs/vlen.pyx":225 + /* "numcodecs/vlen.pyx":224 * * # setup intermediates * lengths = np.empty(n_items, dtype=np.intc) # <<<<<<<<<<<<<< * * # first iteration to find lengths */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_intc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_intc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 225, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_6); - if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 225, __pyx_L1_error) + if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_lengths = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "numcodecs/vlen.pyx":228 + /* "numcodecs/vlen.pyx":227 * * # first iteration to find lengths * data_length = 0 # <<<<<<<<<<<<<< @@ -3959,7 +3959,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ __pyx_v_data_length = 0; - /* "numcodecs/vlen.pyx":229 + /* "numcodecs/vlen.pyx":228 * # first iteration to find lengths * data_length = 0 * for i in range(n_items): # <<<<<<<<<<<<<< @@ -3970,7 +3970,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "numcodecs/vlen.pyx":230 + /* "numcodecs/vlen.pyx":229 * data_length = 0 * for i in range(n_items): * b = values[i] # <<<<<<<<<<<<<< @@ -3983,7 +3983,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6); __pyx_t_6 = 0; - /* "numcodecs/vlen.pyx":231 + /* "numcodecs/vlen.pyx":230 * for i in range(n_items): * b = values[i] * if not PyBytes_Check(b): # <<<<<<<<<<<<<< @@ -3993,28 +3993,28 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb __pyx_t_11 = ((!(PyBytes_Check(__pyx_v_b) != 0)) != 0); if (__pyx_t_11) { - /* "numcodecs/vlen.pyx":232 + /* "numcodecs/vlen.pyx":231 * b = values[i] * if not PyBytes_Check(b): * raise TypeError('expected byte string, found %r' % b) # <<<<<<<<<<<<<< * l = PyBytes_GET_SIZE(b) * data_length += l + 4 # 4 bytes to store item length */ - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_expected_byte_string_found_r, __pyx_v_b); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_expected_byte_string_found_r, __pyx_v_b); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 232, __pyx_L1_error) + __PYX_ERR(0, 231, __pyx_L1_error) - /* "numcodecs/vlen.pyx":231 + /* "numcodecs/vlen.pyx":230 * for i in range(n_items): * b = values[i] * if not PyBytes_Check(b): # <<<<<<<<<<<<<< @@ -4023,7 +4023,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ } - /* "numcodecs/vlen.pyx":233 + /* "numcodecs/vlen.pyx":232 * if not PyBytes_Check(b): * raise TypeError('expected byte string, found %r' % b) * l = PyBytes_GET_SIZE(b) # <<<<<<<<<<<<<< @@ -4032,7 +4032,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ __pyx_v_l = PyBytes_GET_SIZE(__pyx_v_b); - /* "numcodecs/vlen.pyx":234 + /* "numcodecs/vlen.pyx":233 * raise TypeError('expected byte string, found %r' % b) * l = PyBytes_GET_SIZE(b) * data_length += l + 4 # 4 bytes to store item length # <<<<<<<<<<<<<< @@ -4041,7 +4041,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ __pyx_v_data_length = (__pyx_v_data_length + (__pyx_v_l + 4)); - /* "numcodecs/vlen.pyx":235 + /* "numcodecs/vlen.pyx":234 * l = PyBytes_GET_SIZE(b) * data_length += l + 4 # 4 bytes to store item length * lengths[i] = l # <<<<<<<<<<<<<< @@ -4052,7 +4052,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb *((int *) ( /* dim=0 */ (__pyx_v_lengths.data + __pyx_t_12 * __pyx_v_lengths.strides[0]) )) = __pyx_v_l; } - /* "numcodecs/vlen.pyx":238 + /* "numcodecs/vlen.pyx":237 * * # setup output * total_length = HEADER_LENGTH + data_length # <<<<<<<<<<<<<< @@ -4061,19 +4061,19 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ __pyx_v_total_length = (__pyx_v_9numcodecs_4vlen_HEADER_LENGTH + __pyx_v_data_length); - /* "numcodecs/vlen.pyx":239 + /* "numcodecs/vlen.pyx":238 * # setup output * total_length = HEADER_LENGTH + data_length * out = PyByteArray_FromStringAndSize(NULL, total_length) # <<<<<<<<<<<<<< * * # write header */ - __pyx_t_6 = PyByteArray_FromStringAndSize(NULL, __pyx_v_total_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_6 = PyByteArray_FromStringAndSize(NULL, __pyx_v_total_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_out = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "numcodecs/vlen.pyx":242 + /* "numcodecs/vlen.pyx":241 * * # write header * data = PyByteArray_AS_STRING(out) # <<<<<<<<<<<<<< @@ -4082,7 +4082,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ __pyx_v_data = PyByteArray_AS_STRING(__pyx_v_out); - /* "numcodecs/vlen.pyx":243 + /* "numcodecs/vlen.pyx":242 * # write header * data = PyByteArray_AS_STRING(out) * store_le32(data, n_items) # <<<<<<<<<<<<<< @@ -4091,7 +4091,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ store_le32(__pyx_v_data, __pyx_v_n_items); - /* "numcodecs/vlen.pyx":246 + /* "numcodecs/vlen.pyx":245 * * # second iteration, store data * data += HEADER_LENGTH # <<<<<<<<<<<<<< @@ -4100,7 +4100,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ __pyx_v_data = (__pyx_v_data + __pyx_v_9numcodecs_4vlen_HEADER_LENGTH); - /* "numcodecs/vlen.pyx":247 + /* "numcodecs/vlen.pyx":246 * # second iteration, store data * data += HEADER_LENGTH * for i in range(n_items): # <<<<<<<<<<<<<< @@ -4111,7 +4111,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "numcodecs/vlen.pyx":248 + /* "numcodecs/vlen.pyx":247 * data += HEADER_LENGTH * for i in range(n_items): * l = lengths[i] # <<<<<<<<<<<<<< @@ -4121,7 +4121,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb __pyx_t_13 = __pyx_v_i; __pyx_v_l = (*((int *) ( /* dim=0 */ (__pyx_v_lengths.data + __pyx_t_13 * __pyx_v_lengths.strides[0]) ))); - /* "numcodecs/vlen.pyx":249 + /* "numcodecs/vlen.pyx":248 * for i in range(n_items): * l = lengths[i] * store_le32(data, l) # <<<<<<<<<<<<<< @@ -4130,7 +4130,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ store_le32(__pyx_v_data, __pyx_v_l); - /* "numcodecs/vlen.pyx":250 + /* "numcodecs/vlen.pyx":249 * l = lengths[i] * store_le32(data, l) * data += 4 # <<<<<<<<<<<<<< @@ -4139,7 +4139,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ __pyx_v_data = (__pyx_v_data + 4); - /* "numcodecs/vlen.pyx":251 + /* "numcodecs/vlen.pyx":250 * store_le32(data, l) * data += 4 * encv = PyBytes_AS_STRING(values[i]) # <<<<<<<<<<<<<< @@ -4152,7 +4152,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb __pyx_v_encv = PyBytes_AS_STRING(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "numcodecs/vlen.pyx":252 + /* "numcodecs/vlen.pyx":251 * data += 4 * encv = PyBytes_AS_STRING(values[i]) * memcpy(data, encv, l) # <<<<<<<<<<<<<< @@ -4161,7 +4161,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb */ memcpy(__pyx_v_data, __pyx_v_encv, __pyx_v_l); - /* "numcodecs/vlen.pyx":253 + /* "numcodecs/vlen.pyx":252 * encv = PyBytes_AS_STRING(values[i]) * memcpy(data, encv, l) * data += l # <<<<<<<<<<<<<< @@ -4171,7 +4171,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb __pyx_v_data = (__pyx_v_data + __pyx_v_l); } - /* "numcodecs/vlen.pyx":255 + /* "numcodecs/vlen.pyx":254 * data += l * * return out # <<<<<<<<<<<<<< @@ -4183,7 +4183,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb __pyx_r = __pyx_v_out; goto __pyx_L0; - /* "numcodecs/vlen.pyx":208 + /* "numcodecs/vlen.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< @@ -4212,7 +4212,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_2encode(CYTHON_UNUSED PyOb return __pyx_r; } -/* "numcodecs/vlen.pyx":259 +/* "numcodecs/vlen.pyx":258 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< @@ -4257,7 +4257,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenBytes_5decode(PyObject *__pyx_se case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, 1); __PYX_ERR(0, 259, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, 1); __PYX_ERR(0, 258, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -4267,7 +4267,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenBytes_5decode(PyObject *__pyx_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode") < 0)) __PYX_ERR(0, 259, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode") < 0)) __PYX_ERR(0, 258, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4285,7 +4285,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenBytes_5decode(PyObject *__pyx_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 259, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 258, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("numcodecs.vlen.VLenBytes.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4323,16 +4323,16 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __Pyx_RefNannySetupContext("decode", 0); __Pyx_INCREF(__pyx_v_out); - /* "numcodecs/vlen.pyx":267 + /* "numcodecs/vlen.pyx":266 * * # accept any buffer * input_buffer = Buffer(buf, PyBUF_ANY_CONTIGUOUS) # <<<<<<<<<<<<<< * input_length = input_buffer.nbytes * */ - __pyx_t_1 = __Pyx_PyInt_From_int(PyBUF_ANY_CONTIGUOUS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(PyBUF_ANY_CONTIGUOUS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); @@ -4340,13 +4340,13 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9numcodecs_10compat_ext_Buffer), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9numcodecs_10compat_ext_Buffer), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_input_buffer = ((struct __pyx_obj_9numcodecs_10compat_ext_Buffer *)__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":268 + /* "numcodecs/vlen.pyx":267 * # accept any buffer * input_buffer = Buffer(buf, PyBUF_ANY_CONTIGUOUS) * input_length = input_buffer.nbytes # <<<<<<<<<<<<<< @@ -4356,7 +4356,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __pyx_t_3 = __pyx_v_input_buffer->nbytes; __pyx_v_input_length = __pyx_t_3; - /* "numcodecs/vlen.pyx":271 + /* "numcodecs/vlen.pyx":270 * * # sanity checks * if input_length < HEADER_LENGTH: # <<<<<<<<<<<<<< @@ -4366,20 +4366,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __pyx_t_4 = ((__pyx_v_input_length < __pyx_v_9numcodecs_4vlen_HEADER_LENGTH) != 0); if (__pyx_t_4) { - /* "numcodecs/vlen.pyx":272 + /* "numcodecs/vlen.pyx":271 * # sanity checks * if input_length < HEADER_LENGTH: * raise ValueError('corrupt buffer, missing or truncated header') # <<<<<<<<<<<<<< * * # obtain input data pointer */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 272, __pyx_L1_error) + __PYX_ERR(0, 271, __pyx_L1_error) - /* "numcodecs/vlen.pyx":271 + /* "numcodecs/vlen.pyx":270 * * # sanity checks * if input_length < HEADER_LENGTH: # <<<<<<<<<<<<<< @@ -4388,7 +4388,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb */ } - /* "numcodecs/vlen.pyx":275 + /* "numcodecs/vlen.pyx":274 * * # obtain input data pointer * data = input_buffer.ptr # <<<<<<<<<<<<<< @@ -4398,7 +4398,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __pyx_t_5 = __pyx_v_input_buffer->ptr; __pyx_v_data = __pyx_t_5; - /* "numcodecs/vlen.pyx":276 + /* "numcodecs/vlen.pyx":275 * # obtain input data pointer * data = input_buffer.ptr * data_end = data + input_length # <<<<<<<<<<<<<< @@ -4407,7 +4407,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb */ __pyx_v_data_end = (__pyx_v_data + __pyx_v_input_length); - /* "numcodecs/vlen.pyx":279 + /* "numcodecs/vlen.pyx":278 * * # load number of items * n_items = load_le32(data) # <<<<<<<<<<<<<< @@ -4416,7 +4416,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb */ __pyx_v_n_items = load_le32(__pyx_v_data); - /* "numcodecs/vlen.pyx":282 + /* "numcodecs/vlen.pyx":281 * * # setup output * if out is not None: # <<<<<<<<<<<<<< @@ -4427,16 +4427,16 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __pyx_t_6 = (__pyx_t_4 != 0); if (__pyx_t_6) { - /* "numcodecs/vlen.pyx":283 + /* "numcodecs/vlen.pyx":282 * # setup output * if out is not None: * out = check_out_param(out, n_items) # <<<<<<<<<<<<<< * else: * out = np.empty(n_items, dtype=object) */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_out_param); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_out_param); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -4453,7 +4453,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_out, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -4462,14 +4462,14 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_out, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -4480,7 +4480,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -4488,7 +4488,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":282 + /* "numcodecs/vlen.pyx":281 * * # setup output * if out is not None: # <<<<<<<<<<<<<< @@ -4498,7 +4498,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb goto __pyx_L4; } - /* "numcodecs/vlen.pyx":285 + /* "numcodecs/vlen.pyx":284 * out = check_out_param(out, n_items) * else: * out = np.empty(n_items, dtype=object) # <<<<<<<<<<<<<< @@ -4506,22 +4506,22 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb * # iterate and decode - N.B., do not try to cast `out` as object[:] */ /*else*/ { - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 285, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -4531,7 +4531,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb } __pyx_L4:; - /* "numcodecs/vlen.pyx":290 + /* "numcodecs/vlen.pyx":289 * # as this causes segfaults, possibly similar to * # https://github.com/cython/cython/issues/1608 * data += HEADER_LENGTH # <<<<<<<<<<<<<< @@ -4540,7 +4540,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb */ __pyx_v_data = (__pyx_v_data + __pyx_v_9numcodecs_4vlen_HEADER_LENGTH); - /* "numcodecs/vlen.pyx":291 + /* "numcodecs/vlen.pyx":290 * # https://github.com/cython/cython/issues/1608 * data += HEADER_LENGTH * for i in range(n_items): # <<<<<<<<<<<<<< @@ -4551,7 +4551,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; - /* "numcodecs/vlen.pyx":292 + /* "numcodecs/vlen.pyx":291 * data += HEADER_LENGTH * for i in range(n_items): * if data + 4 > data_end: # <<<<<<<<<<<<<< @@ -4561,20 +4561,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __pyx_t_6 = (((__pyx_v_data + 4) > __pyx_v_data_end) != 0); if (__pyx_t_6) { - /* "numcodecs/vlen.pyx":293 + /* "numcodecs/vlen.pyx":292 * for i in range(n_items): * if data + 4 > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * l = load_le32(data) * data += 4 */ - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 293, __pyx_L1_error) + __PYX_ERR(0, 292, __pyx_L1_error) - /* "numcodecs/vlen.pyx":292 + /* "numcodecs/vlen.pyx":291 * data += HEADER_LENGTH * for i in range(n_items): * if data + 4 > data_end: # <<<<<<<<<<<<<< @@ -4583,7 +4583,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb */ } - /* "numcodecs/vlen.pyx":294 + /* "numcodecs/vlen.pyx":293 * if data + 4 > data_end: * raise ValueError('corrupt buffer, data seem truncated') * l = load_le32(data) # <<<<<<<<<<<<<< @@ -4592,7 +4592,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb */ __pyx_v_l = load_le32(__pyx_v_data); - /* "numcodecs/vlen.pyx":295 + /* "numcodecs/vlen.pyx":294 * raise ValueError('corrupt buffer, data seem truncated') * l = load_le32(data) * data += 4 # <<<<<<<<<<<<<< @@ -4601,7 +4601,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb */ __pyx_v_data = (__pyx_v_data + 4); - /* "numcodecs/vlen.pyx":296 + /* "numcodecs/vlen.pyx":295 * l = load_le32(data) * data += 4 * if data + l > data_end: # <<<<<<<<<<<<<< @@ -4611,20 +4611,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __pyx_t_6 = (((__pyx_v_data + __pyx_v_l) > __pyx_v_data_end) != 0); if (__pyx_t_6) { - /* "numcodecs/vlen.pyx":297 + /* "numcodecs/vlen.pyx":296 * data += 4 * if data + l > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * out[i] = PyBytes_FromStringAndSize(data, l) * data += l */ - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 297, __pyx_L1_error) + __PYX_ERR(0, 296, __pyx_L1_error) - /* "numcodecs/vlen.pyx":296 + /* "numcodecs/vlen.pyx":295 * l = load_le32(data) * data += 4 * if data + l > data_end: # <<<<<<<<<<<<<< @@ -4633,19 +4633,19 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb */ } - /* "numcodecs/vlen.pyx":298 + /* "numcodecs/vlen.pyx":297 * if data + l > data_end: * raise ValueError('corrupt buffer, data seem truncated') * out[i] = PyBytes_FromStringAndSize(data, l) # <<<<<<<<<<<<<< * data += l * */ - __pyx_t_7 = PyBytes_FromStringAndSize(__pyx_v_data, __pyx_v_l); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_7 = PyBytes_FromStringAndSize(__pyx_v_data, __pyx_v_l); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely(__Pyx_SetItemInt(__pyx_v_out, __pyx_v_i, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0) < 0)) __PYX_ERR(0, 298, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_out, __pyx_v_i, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0) < 0)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "numcodecs/vlen.pyx":299 + /* "numcodecs/vlen.pyx":298 * raise ValueError('corrupt buffer, data seem truncated') * out[i] = PyBytes_FromStringAndSize(data, l) * data += l # <<<<<<<<<<<<<< @@ -4655,7 +4655,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __pyx_v_data = (__pyx_v_data + __pyx_v_l); } - /* "numcodecs/vlen.pyx":301 + /* "numcodecs/vlen.pyx":300 * data += l * * return out # <<<<<<<<<<<<<< @@ -4667,7 +4667,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb __pyx_r = __pyx_v_out; goto __pyx_L0; - /* "numcodecs/vlen.pyx":259 + /* "numcodecs/vlen.pyx":258 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< @@ -4692,7 +4692,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenBytes_4decode(CYTHON_UNUSED PyOb return __pyx_r; } -/* "numcodecs/vlen.pyx":329 +/* "numcodecs/vlen.pyx":328 * codec_id = 'vlen-array' * * def __init__(self, dtype): # <<<<<<<<<<<<<< @@ -4733,11 +4733,11 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenArray_1__init__(PyObject *__pyx_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 328, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 328, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4750,7 +4750,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenArray_1__init__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 328, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("numcodecs.vlen.VLenArray.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4772,16 +4772,16 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray___init__(CYTHON_UNUSED PyO PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "numcodecs/vlen.pyx":330 + /* "numcodecs/vlen.pyx":329 * * def __init__(self, dtype): * self.dtype = np.dtype(dtype) # <<<<<<<<<<<<<< * * def get_config(self): */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -4795,13 +4795,13 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray___init__(CYTHON_UNUSED PyO } } if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_dtype}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -4809,28 +4809,28 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray___init__(CYTHON_UNUSED PyO #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_dtype}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_dtype); __Pyx_GIVEREF(__pyx_v_dtype); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_dtype); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 330, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":329 + /* "numcodecs/vlen.pyx":328 * codec_id = 'vlen-array' * * def __init__(self, dtype): # <<<<<<<<<<<<<< @@ -4854,7 +4854,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray___init__(CYTHON_UNUSED PyO return __pyx_r; } -/* "numcodecs/vlen.pyx":332 +/* "numcodecs/vlen.pyx":331 * self.dtype = np.dtype(dtype) * * def get_config(self): # <<<<<<<<<<<<<< @@ -4885,46 +4885,46 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_2get_config(CYTHON_UNUSED PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_config", 0); - /* "numcodecs/vlen.pyx":333 + /* "numcodecs/vlen.pyx":332 * * def get_config(self): * config = dict() # <<<<<<<<<<<<<< * config['id'] = self.codec_id * config['dtype'] = self.dtype.str */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_config = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":334 + /* "numcodecs/vlen.pyx":333 * def get_config(self): * config = dict() * config['id'] = self.codec_id # <<<<<<<<<<<<<< * config['dtype'] = self.dtype.str * return config */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_codec_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_codec_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_config, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 334, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_config, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":335 + /* "numcodecs/vlen.pyx":334 * config = dict() * config['id'] = self.codec_id * config['dtype'] = self.dtype.str # <<<<<<<<<<<<<< * return config * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_config, __pyx_n_s_dtype, __pyx_t_2) < 0)) __PYX_ERR(0, 335, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_config, __pyx_n_s_dtype, __pyx_t_2) < 0)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "numcodecs/vlen.pyx":336 + /* "numcodecs/vlen.pyx":335 * config['id'] = self.codec_id * config['dtype'] = self.dtype.str * return config # <<<<<<<<<<<<<< @@ -4936,7 +4936,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_2get_config(CYTHON_UNUSED __pyx_r = __pyx_v_config; goto __pyx_L0; - /* "numcodecs/vlen.pyx":332 + /* "numcodecs/vlen.pyx":331 * self.dtype = np.dtype(dtype) * * def get_config(self): # <<<<<<<<<<<<<< @@ -4957,7 +4957,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_2get_config(CYTHON_UNUSED return __pyx_r; } -/* "numcodecs/vlen.pyx":338 +/* "numcodecs/vlen.pyx":337 * return config * * def __repr__(self): # <<<<<<<<<<<<<< @@ -4988,7 +4988,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_4__repr__(CYTHON_UNUSED Py PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "numcodecs/vlen.pyx":339 + /* "numcodecs/vlen.pyx":338 * * def __repr__(self): * return '%s(dtype=%r)' % (type(self).__name__, self.dtype.str,) # <<<<<<<<<<<<<< @@ -4996,14 +4996,14 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_4__repr__(CYTHON_UNUSED Py * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_self)), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_self)), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -5011,14 +5011,14 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_4__repr__(CYTHON_UNUSED Py PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_dtype_r, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_dtype_r, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "numcodecs/vlen.pyx":338 + /* "numcodecs/vlen.pyx":337 * return config * * def __repr__(self): # <<<<<<<<<<<<<< @@ -5039,7 +5039,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_4__repr__(CYTHON_UNUSED Py return __pyx_r; } -/* "numcodecs/vlen.pyx":343 +/* "numcodecs/vlen.pyx":342 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< @@ -5080,11 +5080,11 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenArray_7encode(PyObject *__pyx_se case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 343, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 342, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 343, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 342, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5097,7 +5097,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenArray_7encode(PyObject *__pyx_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 343, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 342, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("numcodecs.vlen.VLenArray.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5148,49 +5148,49 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb char *__pyx_t_20; __Pyx_RefNannySetupContext("encode", 0); - /* "numcodecs/vlen.pyx":357 + /* "numcodecs/vlen.pyx":356 * * # normalise input * values = np.asanyarray(buf, dtype=object).reshape(-1, order='A') # <<<<<<<<<<<<<< * * # determine number of items */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asanyarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asanyarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_buf); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 357, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_A) < 0) __PYX_ERR(0, 357, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__13, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_A) < 0) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__13, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_object(__pyx_t_1); - if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 357, __pyx_L1_error) + if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_values = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "numcodecs/vlen.pyx":360 + /* "numcodecs/vlen.pyx":359 * * # determine number of items * n_items = values.shape[0] # <<<<<<<<<<<<<< @@ -5199,81 +5199,81 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ __pyx_v_n_items = (__pyx_v_values.shape[0]); - /* "numcodecs/vlen.pyx":363 + /* "numcodecs/vlen.pyx":362 * * # setup intermediates * normed_values = np.empty(n_items, dtype=object) # <<<<<<<<<<<<<< * lengths = np.empty(n_items, dtype=np.intc) * */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 363, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_object(__pyx_t_2); - if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 363, __pyx_L1_error) + if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_normed_values = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "numcodecs/vlen.pyx":364 + /* "numcodecs/vlen.pyx":363 * # setup intermediates * normed_values = np.empty(n_items, dtype=object) * lengths = np.empty(n_items, dtype=np.intc) # <<<<<<<<<<<<<< * * # first iteration to convert to bytes */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_intc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_intc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 364, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_6); - if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 364, __pyx_L1_error) + if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_lengths = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "numcodecs/vlen.pyx":367 + /* "numcodecs/vlen.pyx":366 * * # first iteration to convert to bytes * data_length = 0 # <<<<<<<<<<<<<< @@ -5282,7 +5282,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ __pyx_v_data_length = 0; - /* "numcodecs/vlen.pyx":368 + /* "numcodecs/vlen.pyx":367 * # first iteration to convert to bytes * data_length = 0 * for i in range(n_items): # <<<<<<<<<<<<<< @@ -5293,22 +5293,22 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "numcodecs/vlen.pyx":369 + /* "numcodecs/vlen.pyx":368 * data_length = 0 * for i in range(n_items): * v = np.ascontiguousarray(values[i], self.dtype) # <<<<<<<<<<<<<< * if v.ndim != 1: * raise ValueError('only 1-dimensional arrays are supported') */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_v_i; __pyx_t_2 = (PyObject *) *((PyObject * *) ( /* dim=0 */ (__pyx_v_values.data + __pyx_t_10 * __pyx_v_values.strides[0]) )); __Pyx_INCREF((PyObject*)__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -5325,7 +5325,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_t_1}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -5335,7 +5335,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_t_1}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -5343,7 +5343,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -5354,7 +5354,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -5362,35 +5362,35 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; - /* "numcodecs/vlen.pyx":370 + /* "numcodecs/vlen.pyx":369 * for i in range(n_items): * v = np.ascontiguousarray(values[i], self.dtype) * if v.ndim != 1: # <<<<<<<<<<<<<< * raise ValueError('only 1-dimensional arrays are supported') * l = v.nbytes */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_13) { - /* "numcodecs/vlen.pyx":371 + /* "numcodecs/vlen.pyx":370 * v = np.ascontiguousarray(values[i], self.dtype) * if v.ndim != 1: * raise ValueError('only 1-dimensional arrays are supported') # <<<<<<<<<<<<<< * l = v.nbytes * normed_values[i] = v */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 371, __pyx_L1_error) + __PYX_ERR(0, 370, __pyx_L1_error) - /* "numcodecs/vlen.pyx":370 + /* "numcodecs/vlen.pyx":369 * for i in range(n_items): * v = np.ascontiguousarray(values[i], self.dtype) * if v.ndim != 1: # <<<<<<<<<<<<<< @@ -5399,20 +5399,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ } - /* "numcodecs/vlen.pyx":372 + /* "numcodecs/vlen.pyx":371 * if v.ndim != 1: * raise ValueError('only 1-dimensional arrays are supported') * l = v.nbytes # <<<<<<<<<<<<<< * normed_values[i] = v * data_length += l + 4 # 4 bytes to store item length */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_nbytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_nbytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_l = __pyx_t_14; - /* "numcodecs/vlen.pyx":373 + /* "numcodecs/vlen.pyx":372 * raise ValueError('only 1-dimensional arrays are supported') * l = v.nbytes * normed_values[i] = v # <<<<<<<<<<<<<< @@ -5426,7 +5426,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb *__pyx_t_16 = __pyx_v_v; __Pyx_GIVEREF(*__pyx_t_16); - /* "numcodecs/vlen.pyx":374 + /* "numcodecs/vlen.pyx":373 * l = v.nbytes * normed_values[i] = v * data_length += l + 4 # 4 bytes to store item length # <<<<<<<<<<<<<< @@ -5435,7 +5435,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ __pyx_v_data_length = (__pyx_v_data_length + (__pyx_v_l + 4)); - /* "numcodecs/vlen.pyx":375 + /* "numcodecs/vlen.pyx":374 * normed_values[i] = v * data_length += l + 4 # 4 bytes to store item length * lengths[i] = l # <<<<<<<<<<<<<< @@ -5446,7 +5446,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb *((int *) ( /* dim=0 */ (__pyx_v_lengths.data + __pyx_t_17 * __pyx_v_lengths.strides[0]) )) = __pyx_v_l; } - /* "numcodecs/vlen.pyx":378 + /* "numcodecs/vlen.pyx":377 * * # setup output * total_length = HEADER_LENGTH + data_length # <<<<<<<<<<<<<< @@ -5455,19 +5455,19 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ __pyx_v_total_length = (__pyx_v_9numcodecs_4vlen_HEADER_LENGTH + __pyx_v_data_length); - /* "numcodecs/vlen.pyx":379 + /* "numcodecs/vlen.pyx":378 * # setup output * total_length = HEADER_LENGTH + data_length * out = PyByteArray_FromStringAndSize(NULL, total_length) # <<<<<<<<<<<<<< * * # write header */ - __pyx_t_3 = PyByteArray_FromStringAndSize(NULL, __pyx_v_total_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) + __pyx_t_3 = PyByteArray_FromStringAndSize(NULL, __pyx_v_total_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_out = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "numcodecs/vlen.pyx":382 + /* "numcodecs/vlen.pyx":381 * * # write header * data = PyByteArray_AS_STRING(out) # <<<<<<<<<<<<<< @@ -5476,7 +5476,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ __pyx_v_data = PyByteArray_AS_STRING(__pyx_v_out); - /* "numcodecs/vlen.pyx":383 + /* "numcodecs/vlen.pyx":382 * # write header * data = PyByteArray_AS_STRING(out) * store_le32(data, n_items) # <<<<<<<<<<<<<< @@ -5485,7 +5485,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ store_le32(__pyx_v_data, __pyx_v_n_items); - /* "numcodecs/vlen.pyx":386 + /* "numcodecs/vlen.pyx":385 * * # second iteration, store data * data += HEADER_LENGTH # <<<<<<<<<<<<<< @@ -5494,7 +5494,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ __pyx_v_data = (__pyx_v_data + __pyx_v_9numcodecs_4vlen_HEADER_LENGTH); - /* "numcodecs/vlen.pyx":387 + /* "numcodecs/vlen.pyx":386 * # second iteration, store data * data += HEADER_LENGTH * for i in range(n_items): # <<<<<<<<<<<<<< @@ -5505,7 +5505,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "numcodecs/vlen.pyx":388 + /* "numcodecs/vlen.pyx":387 * data += HEADER_LENGTH * for i in range(n_items): * l = lengths[i] # <<<<<<<<<<<<<< @@ -5515,7 +5515,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb __pyx_t_18 = __pyx_v_i; __pyx_v_l = (*((int *) ( /* dim=0 */ (__pyx_v_lengths.data + __pyx_t_18 * __pyx_v_lengths.strides[0]) ))); - /* "numcodecs/vlen.pyx":389 + /* "numcodecs/vlen.pyx":388 * for i in range(n_items): * l = lengths[i] * store_le32(data, l) # <<<<<<<<<<<<<< @@ -5524,7 +5524,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ store_le32(__pyx_v_data, __pyx_v_l); - /* "numcodecs/vlen.pyx":390 + /* "numcodecs/vlen.pyx":389 * l = lengths[i] * store_le32(data, l) * data += 4 # <<<<<<<<<<<<<< @@ -5533,7 +5533,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ __pyx_v_data = (__pyx_v_data + 4); - /* "numcodecs/vlen.pyx":391 + /* "numcodecs/vlen.pyx":390 * store_le32(data, l) * data += 4 * value_buffer = Buffer(normed_values[i], PyBUF_ANY_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -5543,9 +5543,9 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb __pyx_t_19 = __pyx_v_i; __pyx_t_3 = (PyObject *) *((PyObject * *) ( /* dim=0 */ (__pyx_v_normed_values.data + __pyx_t_19 * __pyx_v_normed_values.strides[0]) )); __Pyx_INCREF((PyObject*)__pyx_t_3); - __pyx_t_6 = __Pyx_PyInt_From_int(PyBUF_ANY_CONTIGUOUS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(PyBUF_ANY_CONTIGUOUS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); @@ -5553,13 +5553,13 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_6); __pyx_t_3 = 0; __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9numcodecs_10compat_ext_Buffer), __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9numcodecs_10compat_ext_Buffer), __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_value_buffer, ((struct __pyx_obj_9numcodecs_10compat_ext_Buffer *)__pyx_t_6)); __pyx_t_6 = 0; - /* "numcodecs/vlen.pyx":392 + /* "numcodecs/vlen.pyx":391 * data += 4 * value_buffer = Buffer(normed_values[i], PyBUF_ANY_CONTIGUOUS) * encv = value_buffer.ptr # <<<<<<<<<<<<<< @@ -5569,7 +5569,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb __pyx_t_20 = __pyx_v_value_buffer->ptr; __pyx_v_encv = __pyx_t_20; - /* "numcodecs/vlen.pyx":393 + /* "numcodecs/vlen.pyx":392 * value_buffer = Buffer(normed_values[i], PyBUF_ANY_CONTIGUOUS) * encv = value_buffer.ptr * memcpy(data, encv, l) # <<<<<<<<<<<<<< @@ -5578,7 +5578,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ memcpy(__pyx_v_data, __pyx_v_encv, __pyx_v_l); - /* "numcodecs/vlen.pyx":394 + /* "numcodecs/vlen.pyx":393 * encv = value_buffer.ptr * memcpy(data, encv, l) * data += l # <<<<<<<<<<<<<< @@ -5587,19 +5587,19 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb */ __pyx_v_data = (__pyx_v_data + __pyx_v_l); - /* "numcodecs/vlen.pyx":395 + /* "numcodecs/vlen.pyx":394 * memcpy(data, encv, l) * data += l * value_buffer.release() # <<<<<<<<<<<<<< * * return out */ - __pyx_t_6 = ((struct __pyx_vtabstruct_9numcodecs_10compat_ext_Buffer *)__pyx_v_value_buffer->__pyx_vtab)->release(__pyx_v_value_buffer, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_9numcodecs_10compat_ext_Buffer *)__pyx_v_value_buffer->__pyx_vtab)->release(__pyx_v_value_buffer, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - /* "numcodecs/vlen.pyx":397 + /* "numcodecs/vlen.pyx":396 * value_buffer.release() * * return out # <<<<<<<<<<<<<< @@ -5611,7 +5611,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb __pyx_r = __pyx_v_out; goto __pyx_L0; - /* "numcodecs/vlen.pyx":343 + /* "numcodecs/vlen.pyx":342 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< @@ -5643,7 +5643,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_6encode(CYTHON_UNUSED PyOb return __pyx_r; } -/* "numcodecs/vlen.pyx":401 +/* "numcodecs/vlen.pyx":400 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< @@ -5688,7 +5688,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenArray_9decode(PyObject *__pyx_se case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, 1); __PYX_ERR(0, 401, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, 1); __PYX_ERR(0, 400, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -5698,7 +5698,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenArray_9decode(PyObject *__pyx_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode") < 0)) __PYX_ERR(0, 401, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode") < 0)) __PYX_ERR(0, 400, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5716,7 +5716,7 @@ static PyObject *__pyx_pw_9numcodecs_4vlen_9VLenArray_9decode(PyObject *__pyx_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 401, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("decode", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 400, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("numcodecs.vlen.VLenArray.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5754,16 +5754,16 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __Pyx_RefNannySetupContext("decode", 0); __Pyx_INCREF(__pyx_v_out); - /* "numcodecs/vlen.pyx":409 + /* "numcodecs/vlen.pyx":408 * * # accept any buffer * input_buffer = Buffer(buf, PyBUF_ANY_CONTIGUOUS) # <<<<<<<<<<<<<< * input_length = input_buffer.nbytes * */ - __pyx_t_1 = __Pyx_PyInt_From_int(PyBUF_ANY_CONTIGUOUS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(PyBUF_ANY_CONTIGUOUS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); @@ -5771,13 +5771,13 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9numcodecs_10compat_ext_Buffer), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9numcodecs_10compat_ext_Buffer), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_input_buffer = ((struct __pyx_obj_9numcodecs_10compat_ext_Buffer *)__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":410 + /* "numcodecs/vlen.pyx":409 * # accept any buffer * input_buffer = Buffer(buf, PyBUF_ANY_CONTIGUOUS) * input_length = input_buffer.nbytes # <<<<<<<<<<<<<< @@ -5787,7 +5787,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __pyx_t_3 = __pyx_v_input_buffer->nbytes; __pyx_v_input_length = __pyx_t_3; - /* "numcodecs/vlen.pyx":413 + /* "numcodecs/vlen.pyx":412 * * # sanity checks * if input_length < HEADER_LENGTH: # <<<<<<<<<<<<<< @@ -5797,20 +5797,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __pyx_t_4 = ((__pyx_v_input_length < __pyx_v_9numcodecs_4vlen_HEADER_LENGTH) != 0); if (__pyx_t_4) { - /* "numcodecs/vlen.pyx":414 + /* "numcodecs/vlen.pyx":413 * # sanity checks * if input_length < HEADER_LENGTH: * raise ValueError('corrupt buffer, missing or truncated header') # <<<<<<<<<<<<<< * * # obtain input data pointer */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 414, __pyx_L1_error) + __PYX_ERR(0, 413, __pyx_L1_error) - /* "numcodecs/vlen.pyx":413 + /* "numcodecs/vlen.pyx":412 * * # sanity checks * if input_length < HEADER_LENGTH: # <<<<<<<<<<<<<< @@ -5819,7 +5819,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb */ } - /* "numcodecs/vlen.pyx":417 + /* "numcodecs/vlen.pyx":416 * * # obtain input data pointer * data = input_buffer.ptr # <<<<<<<<<<<<<< @@ -5829,7 +5829,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __pyx_t_5 = __pyx_v_input_buffer->ptr; __pyx_v_data = __pyx_t_5; - /* "numcodecs/vlen.pyx":418 + /* "numcodecs/vlen.pyx":417 * # obtain input data pointer * data = input_buffer.ptr * data_end = data + input_length # <<<<<<<<<<<<<< @@ -5838,7 +5838,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb */ __pyx_v_data_end = (__pyx_v_data + __pyx_v_input_length); - /* "numcodecs/vlen.pyx":421 + /* "numcodecs/vlen.pyx":420 * * # load number of items * n_items = load_le32(data) # <<<<<<<<<<<<<< @@ -5847,7 +5847,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb */ __pyx_v_n_items = load_le32(__pyx_v_data); - /* "numcodecs/vlen.pyx":424 + /* "numcodecs/vlen.pyx":423 * * # setup output * if out is not None: # <<<<<<<<<<<<<< @@ -5858,16 +5858,16 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __pyx_t_6 = (__pyx_t_4 != 0); if (__pyx_t_6) { - /* "numcodecs/vlen.pyx":425 + /* "numcodecs/vlen.pyx":424 * # setup output * if out is not None: * out = check_out_param(out, n_items) # <<<<<<<<<<<<<< * else: * out = np.empty(n_items, dtype=object) */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_out_param); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_out_param); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -5884,7 +5884,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_out, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -5893,14 +5893,14 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_out, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -5911,7 +5911,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -5919,7 +5919,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":424 + /* "numcodecs/vlen.pyx":423 * * # setup output * if out is not None: # <<<<<<<<<<<<<< @@ -5929,7 +5929,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb goto __pyx_L4; } - /* "numcodecs/vlen.pyx":427 + /* "numcodecs/vlen.pyx":426 * out = check_out_param(out, n_items) * else: * out = np.empty(n_items, dtype=object) # <<<<<<<<<<<<<< @@ -5937,22 +5937,22 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb * # iterate and decode - N.B., do not try to cast `out` as object[:] */ /*else*/ { - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 427, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_builtin_object) < 0) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -5962,7 +5962,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb } __pyx_L4:; - /* "numcodecs/vlen.pyx":432 + /* "numcodecs/vlen.pyx":431 * # as this causes segfaults, possibly similar to * # https://github.com/cython/cython/issues/1608 * data += HEADER_LENGTH # <<<<<<<<<<<<<< @@ -5971,7 +5971,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb */ __pyx_v_data = (__pyx_v_data + __pyx_v_9numcodecs_4vlen_HEADER_LENGTH); - /* "numcodecs/vlen.pyx":433 + /* "numcodecs/vlen.pyx":432 * # https://github.com/cython/cython/issues/1608 * data += HEADER_LENGTH * for i in range(n_items): # <<<<<<<<<<<<<< @@ -5982,7 +5982,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; - /* "numcodecs/vlen.pyx":434 + /* "numcodecs/vlen.pyx":433 * data += HEADER_LENGTH * for i in range(n_items): * if data + 4 > data_end: # <<<<<<<<<<<<<< @@ -5992,20 +5992,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __pyx_t_6 = (((__pyx_v_data + 4) > __pyx_v_data_end) != 0); if (__pyx_t_6) { - /* "numcodecs/vlen.pyx":435 + /* "numcodecs/vlen.pyx":434 * for i in range(n_items): * if data + 4 > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * l = load_le32(data) * data += 4 */ - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 435, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 435, __pyx_L1_error) + __PYX_ERR(0, 434, __pyx_L1_error) - /* "numcodecs/vlen.pyx":434 + /* "numcodecs/vlen.pyx":433 * data += HEADER_LENGTH * for i in range(n_items): * if data + 4 > data_end: # <<<<<<<<<<<<<< @@ -6014,7 +6014,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb */ } - /* "numcodecs/vlen.pyx":436 + /* "numcodecs/vlen.pyx":435 * if data + 4 > data_end: * raise ValueError('corrupt buffer, data seem truncated') * l = load_le32(data) # <<<<<<<<<<<<<< @@ -6023,7 +6023,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb */ __pyx_v_l = load_le32(__pyx_v_data); - /* "numcodecs/vlen.pyx":437 + /* "numcodecs/vlen.pyx":436 * raise ValueError('corrupt buffer, data seem truncated') * l = load_le32(data) * data += 4 # <<<<<<<<<<<<<< @@ -6032,7 +6032,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb */ __pyx_v_data = (__pyx_v_data + 4); - /* "numcodecs/vlen.pyx":438 + /* "numcodecs/vlen.pyx":437 * l = load_le32(data) * data += 4 * if data + l > data_end: # <<<<<<<<<<<<<< @@ -6042,20 +6042,20 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __pyx_t_6 = (((__pyx_v_data + __pyx_v_l) > __pyx_v_data_end) != 0); if (__pyx_t_6) { - /* "numcodecs/vlen.pyx":439 + /* "numcodecs/vlen.pyx":438 * data += 4 * if data + l > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * out[i] = np.frombuffer(data[:l], dtype=self.dtype) * data += l */ - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 439, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 439, __pyx_L1_error) + __PYX_ERR(0, 438, __pyx_L1_error) - /* "numcodecs/vlen.pyx":438 + /* "numcodecs/vlen.pyx":437 * l = load_le32(data) * data += 4 * if data + l > data_end: # <<<<<<<<<<<<<< @@ -6064,40 +6064,40 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb */ } - /* "numcodecs/vlen.pyx":440 + /* "numcodecs/vlen.pyx":439 * if data + l > data_end: * raise ValueError('corrupt buffer, data seem truncated') * out[i] = np.frombuffer(data[:l], dtype=self.dtype) # <<<<<<<<<<<<<< * data += l * */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_data + 0, __pyx_v_l - 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_data + 0, __pyx_v_l - 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 440, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_v_out, __pyx_v_i, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0) < 0)) __PYX_ERR(0, 440, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_out, __pyx_v_i, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0) < 0)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "numcodecs/vlen.pyx":441 + /* "numcodecs/vlen.pyx":440 * raise ValueError('corrupt buffer, data seem truncated') * out[i] = np.frombuffer(data[:l], dtype=self.dtype) * data += l # <<<<<<<<<<<<<< @@ -6107,7 +6107,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __pyx_v_data = (__pyx_v_data + __pyx_v_l); } - /* "numcodecs/vlen.pyx":443 + /* "numcodecs/vlen.pyx":442 * data += l * * return out # <<<<<<<<<<<<<< @@ -6117,7 +6117,7 @@ static PyObject *__pyx_pf_9numcodecs_4vlen_9VLenArray_8decode(CYTHON_UNUSED PyOb __pyx_r = __pyx_v_out; goto __pyx_L0; - /* "numcodecs/vlen.pyx":401 + /* "numcodecs/vlen.pyx":400 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< @@ -20463,10 +20463,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 40, __pyx_L1_error) - __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 41, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 42, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 101, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 109, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(2, 149, __pyx_L1_error) __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(2, 398, __pyx_L1_error) @@ -20481,190 +20481,190 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "numcodecs/vlen.pyx":40 + /* "numcodecs/vlen.pyx":39 * def check_out_param(out, n_items): * if not isinstance(out, np.ndarray): * raise TypeError('out must be 1-dimensional array') # <<<<<<<<<<<<<< * if out.dtype != object: * raise ValueError('out must be object array') */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_out_must_be_1_dimensional_array); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_out_must_be_1_dimensional_array); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "numcodecs/vlen.pyx":42 + /* "numcodecs/vlen.pyx":41 * raise TypeError('out must be 1-dimensional array') * if out.dtype != object: * raise ValueError('out must be object array') # <<<<<<<<<<<<<< * out = out.reshape(-1, order='A') * if out.shape[0] < n_items: */ - __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_out_must_be_object_array); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_out_must_be_object_array); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "numcodecs/vlen.pyx":43 + /* "numcodecs/vlen.pyx":42 * if out.dtype != object: * raise ValueError('out must be object array') * out = out.reshape(-1, order='A') # <<<<<<<<<<<<<< * if out.shape[0] < n_items: * raise ValueError('out is too small') */ - __pyx_tuple__3 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "numcodecs/vlen.pyx":45 + /* "numcodecs/vlen.pyx":44 * out = out.reshape(-1, order='A') * if out.shape[0] < n_items: * raise ValueError('out is too small') # <<<<<<<<<<<<<< * return out * */ - __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_out_is_too_small); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 45, __pyx_L1_error) + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_out_is_too_small); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "numcodecs/vlen.pyx":91 + /* "numcodecs/vlen.pyx":90 * * # normalise input * input_values = np.asanyarray(buf, dtype=object).reshape(-1, order='A') # <<<<<<<<<<<<<< * * # determine number of items */ - __pyx_tuple__5 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "numcodecs/vlen.pyx":147 + /* "numcodecs/vlen.pyx":146 * # sanity checks * if input_length < HEADER_LENGTH: * raise ValueError('corrupt buffer, missing or truncated header') # <<<<<<<<<<<<<< * * # obtain input data pointer */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_missing_or_trunca); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_missing_or_trunca); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "numcodecs/vlen.pyx":168 + /* "numcodecs/vlen.pyx":167 * for i in range(n_items): * if data + 4 > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * l = load_le32(data) * data += 4 */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "numcodecs/vlen.pyx":172 + /* "numcodecs/vlen.pyx":171 * data += 4 * if data + l > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * out[i] = PyUnicode_FromStringAndSize(data, l) * data += l */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "numcodecs/vlen.pyx":219 + /* "numcodecs/vlen.pyx":218 * * # normalise input * values = np.asanyarray(buf, dtype=object).reshape(-1, order='A') # <<<<<<<<<<<<<< * * # determine number of items */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "numcodecs/vlen.pyx":272 + /* "numcodecs/vlen.pyx":271 * # sanity checks * if input_length < HEADER_LENGTH: * raise ValueError('corrupt buffer, missing or truncated header') # <<<<<<<<<<<<<< * * # obtain input data pointer */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_missing_or_trunca); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_missing_or_trunca); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "numcodecs/vlen.pyx":293 + /* "numcodecs/vlen.pyx":292 * for i in range(n_items): * if data + 4 > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * l = load_le32(data) * data += 4 */ - __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "numcodecs/vlen.pyx":297 + /* "numcodecs/vlen.pyx":296 * data += 4 * if data + l > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * out[i] = PyBytes_FromStringAndSize(data, l) * data += l */ - __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - /* "numcodecs/vlen.pyx":357 + /* "numcodecs/vlen.pyx":356 * * # normalise input * values = np.asanyarray(buf, dtype=object).reshape(-1, order='A') # <<<<<<<<<<<<<< * * # determine number of items */ - __pyx_tuple__13 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - /* "numcodecs/vlen.pyx":371 + /* "numcodecs/vlen.pyx":370 * v = np.ascontiguousarray(values[i], self.dtype) * if v.ndim != 1: * raise ValueError('only 1-dimensional arrays are supported') # <<<<<<<<<<<<<< * l = v.nbytes * normed_values[i] = v */ - __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_only_1_dimensional_arrays_are_su); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_only_1_dimensional_arrays_are_su); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "numcodecs/vlen.pyx":414 + /* "numcodecs/vlen.pyx":413 * # sanity checks * if input_length < HEADER_LENGTH: * raise ValueError('corrupt buffer, missing or truncated header') # <<<<<<<<<<<<<< * * # obtain input data pointer */ - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_missing_or_trunca); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_missing_or_trunca); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); - /* "numcodecs/vlen.pyx":435 + /* "numcodecs/vlen.pyx":434 * for i in range(n_items): * if data + 4 > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * l = load_le32(data) * data += 4 */ - __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 435, __pyx_L1_error) + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); - /* "numcodecs/vlen.pyx":439 + /* "numcodecs/vlen.pyx":438 * data += 4 * if data + l > data_end: * raise ValueError('corrupt buffer, data seem truncated') # <<<<<<<<<<<<<< * out[i] = np.frombuffer(data[:l], dtype=self.dtype) * data += l */ - __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 439, __pyx_L1_error) + __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_corrupt_buffer_data_seem_truncat); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); @@ -20871,156 +20871,156 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); - /* "numcodecs/vlen.pyx":38 + /* "numcodecs/vlen.pyx":37 * * * def check_out_param(out, n_items): # <<<<<<<<<<<<<< * if not isinstance(out, np.ndarray): * raise TypeError('out must be 1-dimensional array') */ - __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_out, __pyx_n_s_n_items); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_out, __pyx_n_s_n_items); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); - __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_check_out_param, 38, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_check_out_param, 37, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 37, __pyx_L1_error) - /* "numcodecs/vlen.pyx":73 + /* "numcodecs/vlen.pyx":72 * codec_id = 'vlen-utf8' * * def __init__(self): # <<<<<<<<<<<<<< * pass * */ - __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); - __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_init, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_init, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 72, __pyx_L1_error) - /* "numcodecs/vlen.pyx":78 + /* "numcodecs/vlen.pyx":77 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, l, n_items, data_length, total_length */ - __pyx_tuple__41 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_total_length, __pyx_n_s_input_values, __pyx_n_s_encoded_values, __pyx_n_s_encoded_lengths, __pyx_n_s_encv, __pyx_n_s_b, __pyx_n_s_out, __pyx_n_s_data, __pyx_n_s_u); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_total_length, __pyx_n_s_input_values, __pyx_n_s_encoded_values, __pyx_n_s_encoded_lengths, __pyx_n_s_encv, __pyx_n_s_b, __pyx_n_s_out, __pyx_n_s_data, __pyx_n_s_u); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); - __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_encode, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_encode, 77, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 77, __pyx_L1_error) - /* "numcodecs/vlen.pyx":134 + /* "numcodecs/vlen.pyx":133 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< * cdef: * Buffer input_buffer */ - __pyx_tuple__43 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_out, __pyx_n_s_input_buffer, __pyx_n_s_data, __pyx_n_s_data_end, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_input_length); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_out, __pyx_n_s_input_buffer, __pyx_n_s_data, __pyx_n_s_data_end, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_input_length); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); - __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_decode, 134, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 134, __pyx_L1_error) - __pyx_tuple__45 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_decode, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); - /* "numcodecs/vlen.pyx":203 + /* "numcodecs/vlen.pyx":202 * codec_id = 'vlen-bytes' * * def __init__(self): # <<<<<<<<<<<<<< * pass * */ - __pyx_tuple__46 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_tuple__46 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_init, 203, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_init, 202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 202, __pyx_L1_error) - /* "numcodecs/vlen.pyx":208 + /* "numcodecs/vlen.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, l, n_items, data_length, total_length */ - __pyx_tuple__48 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_total_length, __pyx_n_s_values, __pyx_n_s_lengths, __pyx_n_s_encv, __pyx_n_s_b, __pyx_n_s_out, __pyx_n_s_data); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_tuple__48 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_total_length, __pyx_n_s_values, __pyx_n_s_lengths, __pyx_n_s_encv, __pyx_n_s_b, __pyx_n_s_out, __pyx_n_s_data); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); - __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_encode, 208, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_encode, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 207, __pyx_L1_error) - /* "numcodecs/vlen.pyx":259 + /* "numcodecs/vlen.pyx":258 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< * cdef: * Buffer input_buffer */ - __pyx_tuple__50 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_out, __pyx_n_s_input_buffer, __pyx_n_s_data, __pyx_n_s_data_end, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_input_length); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_tuple__50 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_out, __pyx_n_s_input_buffer, __pyx_n_s_data, __pyx_n_s_data_end, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_input_length); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_decode, 259, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 259, __pyx_L1_error) - __pyx_tuple__52 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_decode, 258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_tuple__52 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); - /* "numcodecs/vlen.pyx":329 + /* "numcodecs/vlen.pyx":328 * codec_id = 'vlen-array' * * def __init__(self, dtype): # <<<<<<<<<<<<<< * self.dtype = np.dtype(dtype) * */ - __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dtype); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dtype); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); - __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_init, 328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 328, __pyx_L1_error) - /* "numcodecs/vlen.pyx":332 + /* "numcodecs/vlen.pyx":331 * self.dtype = np.dtype(dtype) * * def get_config(self): # <<<<<<<<<<<<<< * config = dict() * config['id'] = self.codec_id */ - __pyx_tuple__55 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_config); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_tuple__55 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_config); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); - __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_get_config, 332, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_get_config, 331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 331, __pyx_L1_error) - /* "numcodecs/vlen.pyx":338 + /* "numcodecs/vlen.pyx":337 * return config * * def __repr__(self): # <<<<<<<<<<<<<< * return '%s(dtype=%r)' % (type(self).__name__, self.dtype.str,) * */ - __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_repr, 338, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_repr, 337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 337, __pyx_L1_error) - /* "numcodecs/vlen.pyx":343 + /* "numcodecs/vlen.pyx":342 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, l, n_items, data_length, total_length */ - __pyx_tuple__59 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_total_length, __pyx_n_s_values, __pyx_n_s_normed_values, __pyx_n_s_lengths, __pyx_n_s_encv, __pyx_n_s_b, __pyx_n_s_out, __pyx_n_s_data, __pyx_n_s_value_buffer, __pyx_n_s_v); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_tuple__59 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_total_length, __pyx_n_s_values, __pyx_n_s_normed_values, __pyx_n_s_lengths, __pyx_n_s_encv, __pyx_n_s_b, __pyx_n_s_out, __pyx_n_s_data, __pyx_n_s_value_buffer, __pyx_n_s_v); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_encode, 343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_encode, 342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 342, __pyx_L1_error) - /* "numcodecs/vlen.pyx":401 + /* "numcodecs/vlen.pyx":400 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< * cdef: * Buffer input_buffer */ - __pyx_tuple__61 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_out, __pyx_n_s_input_buffer, __pyx_n_s_data, __pyx_n_s_data_end, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_input_length); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_tuple__61 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_out, __pyx_n_s_input_buffer, __pyx_n_s_data, __pyx_n_s_data_end, __pyx_n_s_i, __pyx_n_s_l, __pyx_n_s_n_items, __pyx_n_s_data_length, __pyx_n_s_input_length); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); - __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_decode, 401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 401, __pyx_L1_error) - __pyx_tuple__63 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_numcodecs_vlen_pyx, __pyx_n_s_decode, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 400, __pyx_L1_error) + __pyx_tuple__63 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); @@ -21306,69 +21306,57 @@ static int __pyx_pymod_exec_vlen(PyObject *__pyx_pyinit_module) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif - /* "numcodecs/vlen.pyx":7 - * # cython: binding=False - * from __future__ import absolute_import, print_function, division - * import struct # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "numcodecs/vlen.pyx":12 + /* "numcodecs/vlen.pyx":11 * import cython * cimport cython * import numpy as np # <<<<<<<<<<<<<< * from .abc import Codec * from .compat_ext cimport Buffer */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":13 + /* "numcodecs/vlen.pyx":12 * cimport cython * import numpy as np * from .abc import Codec # <<<<<<<<<<<<<< * from .compat_ext cimport Buffer * from .compat_ext import Buffer */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Codec); __Pyx_GIVEREF(__pyx_n_s_Codec); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Codec); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_abc, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_abc, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Codec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Codec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Codec, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Codec, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "numcodecs/vlen.pyx":15 + /* "numcodecs/vlen.pyx":14 * from .abc import Codec * from .compat_ext cimport Buffer * from .compat_ext import Buffer # <<<<<<<<<<<<<< * from cpython cimport (PyBytes_GET_SIZE, PyBytes_AS_STRING, PyBytes_Check, * PyBytes_FromStringAndSize, PyUnicode_AsUTF8String) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_Buffer); __Pyx_GIVEREF(__pyx_n_s_Buffer); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Buffer); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_compat_ext, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_compat_ext, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":35 + /* "numcodecs/vlen.pyx":34 * * # 4 bytes to store number of items * cdef Py_ssize_t HEADER_LENGTH = 4 # <<<<<<<<<<<<<< @@ -21377,277 +21365,277 @@ static int __pyx_pymod_exec_vlen(PyObject *__pyx_pyinit_module) */ __pyx_v_9numcodecs_4vlen_HEADER_LENGTH = 4; - /* "numcodecs/vlen.pyx":38 + /* "numcodecs/vlen.pyx":37 * * * def check_out_param(out, n_items): # <<<<<<<<<<<<<< * if not isinstance(out, np.ndarray): * raise TypeError('out must be 1-dimensional array') */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_1check_out_param, NULL, __pyx_n_s_numcodecs_vlen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_1check_out_param, NULL, __pyx_n_s_numcodecs_vlen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_out_param, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_out_param, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":49 + /* "numcodecs/vlen.pyx":48 * * * class VLenUTF8(Codec): # <<<<<<<<<<<<<< * """Encode variable-length unicode string objects via UTF-8. * */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Codec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Codec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_VLenUTF8, __pyx_n_s_VLenUTF8, (PyObject *) NULL, __pyx_n_s_numcodecs_vlen, __pyx_kp_s_Encode_variable_length_unicode_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_VLenUTF8, __pyx_n_s_VLenUTF8, (PyObject *) NULL, __pyx_n_s_numcodecs_vlen, __pyx_kp_s_Encode_variable_length_unicode_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "numcodecs/vlen.pyx":71 + /* "numcodecs/vlen.pyx":70 * """ * * codec_id = 'vlen-utf8' # <<<<<<<<<<<<<< * * def __init__(self): */ - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_codec_id, __pyx_kp_s_vlen_utf8) < 0) __PYX_ERR(0, 71, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_codec_id, __pyx_kp_s_vlen_utf8) < 0) __PYX_ERR(0, 70, __pyx_L1_error) - /* "numcodecs/vlen.pyx":73 + /* "numcodecs/vlen.pyx":72 * codec_id = 'vlen-utf8' * * def __init__(self): # <<<<<<<<<<<<<< * pass * */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_8VLenUTF8_1__init__, 0, __pyx_n_s_VLenUTF8___init, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_8VLenUTF8_1__init__, 0, __pyx_n_s_VLenUTF8___init, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":78 + /* "numcodecs/vlen.pyx":77 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, l, n_items, data_length, total_length */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_8VLenUTF8_3encode, 0, __pyx_n_s_VLenUTF8_encode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_8VLenUTF8_3encode, 0, __pyx_n_s_VLenUTF8_encode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_encode, __pyx_t_4) < 0) __PYX_ERR(0, 78, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_encode, __pyx_t_4) < 0) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":134 + /* "numcodecs/vlen.pyx":133 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< * cdef: * Buffer input_buffer */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_8VLenUTF8_5decode, 0, __pyx_n_s_VLenUTF8_decode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_8VLenUTF8_5decode, 0, __pyx_n_s_VLenUTF8_decode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__45); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_decode, __pyx_t_4) < 0) __PYX_ERR(0, 134, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_decode, __pyx_t_4) < 0) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":49 + /* "numcodecs/vlen.pyx":48 * * * class VLenUTF8(Codec): # <<<<<<<<<<<<<< * """Encode variable-length unicode string objects via UTF-8. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_VLenUTF8, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_VLenUTF8, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_VLenUTF8, __pyx_t_4) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_VLenUTF8, __pyx_t_4) < 0) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "numcodecs/vlen.pyx":179 + /* "numcodecs/vlen.pyx":178 * * * class VLenBytes(Codec): # <<<<<<<<<<<<<< * """Encode variable-length byte string objects. * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Codec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Codec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_VLenBytes, __pyx_n_s_VLenBytes, (PyObject *) NULL, __pyx_n_s_numcodecs_vlen, __pyx_kp_s_Encode_variable_length_byte_stri); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_VLenBytes, __pyx_n_s_VLenBytes, (PyObject *) NULL, __pyx_n_s_numcodecs_vlen, __pyx_kp_s_Encode_variable_length_byte_stri); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "numcodecs/vlen.pyx":201 + /* "numcodecs/vlen.pyx":200 * """ * * codec_id = 'vlen-bytes' # <<<<<<<<<<<<<< * * def __init__(self): */ - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_codec_id, __pyx_kp_s_vlen_bytes) < 0) __PYX_ERR(0, 201, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_codec_id, __pyx_kp_s_vlen_bytes) < 0) __PYX_ERR(0, 200, __pyx_L1_error) - /* "numcodecs/vlen.pyx":203 + /* "numcodecs/vlen.pyx":202 * codec_id = 'vlen-bytes' * * def __init__(self): # <<<<<<<<<<<<<< * pass * */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenBytes_1__init__, 0, __pyx_n_s_VLenBytes___init, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenBytes_1__init__, 0, __pyx_n_s_VLenBytes___init, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 203, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":208 + /* "numcodecs/vlen.pyx":207 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, l, n_items, data_length, total_length */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenBytes_3encode, 0, __pyx_n_s_VLenBytes_encode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenBytes_3encode, 0, __pyx_n_s_VLenBytes_encode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_encode, __pyx_t_4) < 0) __PYX_ERR(0, 208, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_encode, __pyx_t_4) < 0) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":259 + /* "numcodecs/vlen.pyx":258 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< * cdef: * Buffer input_buffer */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenBytes_5decode, 0, __pyx_n_s_VLenBytes_decode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenBytes_5decode, 0, __pyx_n_s_VLenBytes_decode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__52); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_decode, __pyx_t_4) < 0) __PYX_ERR(0, 259, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_decode, __pyx_t_4) < 0) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":179 + /* "numcodecs/vlen.pyx":178 * * * class VLenBytes(Codec): # <<<<<<<<<<<<<< * """Encode variable-length byte string objects. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_VLenBytes, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_VLenBytes, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_VLenBytes, __pyx_t_4) < 0) __PYX_ERR(0, 179, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_VLenBytes, __pyx_t_4) < 0) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "numcodecs/vlen.pyx":304 + /* "numcodecs/vlen.pyx":303 * * * class VLenArray(Codec): # <<<<<<<<<<<<<< * """Encode variable-length 1-dimensional arrays via UTF-8. * */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Codec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Codec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_VLenArray, __pyx_n_s_VLenArray, (PyObject *) NULL, __pyx_n_s_numcodecs_vlen, __pyx_kp_s_Encode_variable_length_1_dimensi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_VLenArray, __pyx_n_s_VLenArray, (PyObject *) NULL, __pyx_n_s_numcodecs_vlen, __pyx_kp_s_Encode_variable_length_1_dimensi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "numcodecs/vlen.pyx":327 + /* "numcodecs/vlen.pyx":326 * """ * * codec_id = 'vlen-array' # <<<<<<<<<<<<<< * * def __init__(self, dtype): */ - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_codec_id, __pyx_kp_s_vlen_array) < 0) __PYX_ERR(0, 327, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_codec_id, __pyx_kp_s_vlen_array) < 0) __PYX_ERR(0, 326, __pyx_L1_error) - /* "numcodecs/vlen.pyx":329 + /* "numcodecs/vlen.pyx":328 * codec_id = 'vlen-array' * * def __init__(self, dtype): # <<<<<<<<<<<<<< * self.dtype = np.dtype(dtype) * */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_1__init__, 0, __pyx_n_s_VLenArray___init, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_1__init__, 0, __pyx_n_s_VLenArray___init, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 329, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":332 + /* "numcodecs/vlen.pyx":331 * self.dtype = np.dtype(dtype) * * def get_config(self): # <<<<<<<<<<<<<< * config = dict() * config['id'] = self.codec_id */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_3get_config, 0, __pyx_n_s_VLenArray_get_config, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_3get_config, 0, __pyx_n_s_VLenArray_get_config, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_get_config, __pyx_t_4) < 0) __PYX_ERR(0, 332, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_get_config, __pyx_t_4) < 0) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":338 + /* "numcodecs/vlen.pyx":337 * return config * * def __repr__(self): # <<<<<<<<<<<<<< * return '%s(dtype=%r)' % (type(self).__name__, self.dtype.str,) * */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_5__repr__, 0, __pyx_n_s_VLenArray___repr, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_5__repr__, 0, __pyx_n_s_VLenArray___repr, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_repr, __pyx_t_4) < 0) __PYX_ERR(0, 338, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_repr, __pyx_t_4) < 0) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":343 + /* "numcodecs/vlen.pyx":342 * @cython.wraparound(False) * @cython.boundscheck(False) * def encode(self, buf): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t i, l, n_items, data_length, total_length */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_7encode, 0, __pyx_n_s_VLenArray_encode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_7encode, 0, __pyx_n_s_VLenArray_encode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_encode, __pyx_t_4) < 0) __PYX_ERR(0, 343, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_encode, __pyx_t_4) < 0) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":401 + /* "numcodecs/vlen.pyx":400 * @cython.wraparound(False) * @cython.boundscheck(False) * def decode(self, buf, out=None): # <<<<<<<<<<<<<< * cdef: * Buffer input_buffer */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_9decode, 0, __pyx_n_s_VLenArray_decode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9numcodecs_4vlen_9VLenArray_9decode, 0, __pyx_n_s_VLenArray_decode, NULL, __pyx_n_s_numcodecs_vlen, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__63); - if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_decode, __pyx_t_4) < 0) __PYX_ERR(0, 401, __pyx_L1_error) + if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_decode, __pyx_t_4) < 0) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "numcodecs/vlen.pyx":304 + /* "numcodecs/vlen.pyx":303 * * * class VLenArray(Codec): # <<<<<<<<<<<<<< * """Encode variable-length 1-dimensional arrays via UTF-8. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_VLenArray, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_VLenArray, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_VLenArray, __pyx_t_4) < 0) __PYX_ERR(0, 304, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_VLenArray, __pyx_t_4) < 0) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; diff --git a/numcodecs/vlen.html b/numcodecs/vlen.html index 2748f904..b27a1749 100644 --- a/numcodecs/vlen.html +++ b/numcodecs/vlen.html @@ -286,75 +286,6 @@ .cython.score-252 {background-color: #FFFF09;} .cython.score-253 {background-color: #FFFF09;} .cython.score-254 {background-color: #FFFF09;} -.cython .hll { background-color: #ffffcc } -.cython { background: #f8f8f8; } -.cython .c { color: #408080; font-style: italic } /* Comment */ -.cython .err { border: 1px solid #FF0000 } /* Error */ -.cython .k { color: #008000; font-weight: bold } /* Keyword */ -.cython .o { color: #666666 } /* Operator */ -.cython .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ -.cython .cm { color: #408080; font-style: italic } /* Comment.Multiline */ -.cython .cp { color: #BC7A00 } /* Comment.Preproc */ -.cython .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ -.cython .c1 { color: #408080; font-style: italic } /* Comment.Single */ -.cython .cs { color: #408080; font-style: italic } /* Comment.Special */ -.cython .gd { color: #A00000 } /* Generic.Deleted */ -.cython .ge { font-style: italic } /* Generic.Emph */ -.cython .gr { color: #FF0000 } /* Generic.Error */ -.cython .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.cython .gi { color: #00A000 } /* Generic.Inserted */ -.cython .go { color: #888888 } /* Generic.Output */ -.cython .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ -.cython .gs { font-weight: bold } /* Generic.Strong */ -.cython .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.cython .gt { color: #0044DD } /* Generic.Traceback */ -.cython .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ -.cython .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ -.cython .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ -.cython .kp { color: #008000 } /* Keyword.Pseudo */ -.cython .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ -.cython .kt { color: #B00040 } /* Keyword.Type */ -.cython .m { color: #666666 } /* Literal.Number */ -.cython .s { color: #BA2121 } /* Literal.String */ -.cython .na { color: #7D9029 } /* Name.Attribute */ -.cython .nb { color: #008000 } /* Name.Builtin */ -.cython .nc { color: #0000FF; font-weight: bold } /* Name.Class */ -.cython .no { color: #880000 } /* Name.Constant */ -.cython .nd { color: #AA22FF } /* Name.Decorator */ -.cython .ni { color: #999999; font-weight: bold } /* Name.Entity */ -.cython .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ -.cython .nf { color: #0000FF } /* Name.Function */ -.cython .nl { color: #A0A000 } /* Name.Label */ -.cython .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ -.cython .nt { color: #008000; font-weight: bold } /* Name.Tag */ -.cython .nv { color: #19177C } /* Name.Variable */ -.cython .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ -.cython .w { color: #bbbbbb } /* Text.Whitespace */ -.cython .mb { color: #666666 } /* Literal.Number.Bin */ -.cython .mf { color: #666666 } /* Literal.Number.Float */ -.cython .mh { color: #666666 } /* Literal.Number.Hex */ -.cython .mi { color: #666666 } /* Literal.Number.Integer */ -.cython .mo { color: #666666 } /* Literal.Number.Oct */ -.cython .sa { color: #BA2121 } /* Literal.String.Affix */ -.cython .sb { color: #BA2121 } /* Literal.String.Backtick */ -.cython .sc { color: #BA2121 } /* Literal.String.Char */ -.cython .dl { color: #BA2121 } /* Literal.String.Delimiter */ -.cython .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ -.cython .s2 { color: #BA2121 } /* Literal.String.Double */ -.cython .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ -.cython .sh { color: #BA2121 } /* Literal.String.Heredoc */ -.cython .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ -.cython .sx { color: #008000 } /* Literal.String.Other */ -.cython .sr { color: #BB6688 } /* Literal.String.Regex */ -.cython .s1 { color: #BA2121 } /* Literal.String.Single */ -.cython .ss { color: #19177C } /* Literal.String.Symbol */ -.cython .bp { color: #008000 } /* Name.Builtin.Pseudo */ -.cython .fm { color: #0000FF } /* Name.Function.Magic */ -.cython .vc { color: #19177C } /* Name.Variable.Class */ -.cython .vg { color: #19177C } /* Name.Variable.Global */ -.cython .vi { color: #19177C } /* Name.Variable.Instance */ -.cython .vm { color: #19177C } /* Name.Variable.Magic */ -.cython .il { color: #666666 } /* Literal.Number.Integer.Long */