Skip to content
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions numcodecs/blosc.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def compress(

blosc.set_blocksize(blocksize)
if isinstance(source, np.ndarray):
print('hi')
if typesize is None:
typesize = source.dtype.itemsize
_check_not_object_array(source)
Expand Down Expand Up @@ -201,14 +200,7 @@ class Blosc(Codec):
AUTOSHUFFLE = AUTOSHUFFLE
max_buffer_size = 2**31 - 1

def __init__(
self,
cname='lz4',
clevel=5,
shuffle=SHUFFLE,
blocksize=AUTOBLOCKS,
typesize: int | None = None,
):
def __init__(self, cname='lz4', clevel=5, shuffle=SHUFFLE, blocksize=AUTOBLOCKS, typesize=None):
if isinstance(typesize, int) and typesize < 1:
raise ValueError(f"Cannot use typesize {typesize} less than 1.")
self.cname = cname
Expand All @@ -219,7 +211,7 @@ def __init__(
self.clevel = clevel
self.shuffle = shuffle
self.blocksize = blocksize
self.typesize = typesize
self._typesize = typesize

def encode(self, buf):
_check_buffer_size(buf, self.max_buffer_size)
Expand All @@ -229,7 +221,7 @@ def encode(self, buf):
clevel=self.clevel,
shuffle=self.shuffle,
blocksize=self.blocksize,
typesize=self.typesize,
typesize=self._typesize,
)

def decode(self, buf, out=None):
Expand Down
Loading