Skip to content

Commit

Permalink
minor bugfix: hard-coded encoded_dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-yatsenko committed Feb 28, 2024
1 parent 830c457 commit 1a7d06a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/poisson_numcodecs/Poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

### NUMCODECS Codec ###
class Poisson(Codec):
"""Codec for 3-dimensional Delta. The codec assumes that input data are of shape:
"""Codec for 3-dimensional data. The codec assumes that input data are of shape:
(time, x, y).
Parameters
Expand Down Expand Up @@ -46,7 +46,7 @@ def decode(self, buf: bytes, out=None) -> np.array:
inverse = estimate.make_inverse_lookup(lookup)
ndims = int(buf[0])
shape = [int(_) for _ in buf[1:ndims+1]]
arr = np.frombuffer(buf[ndims+1:], dtype='uint8').reshape(shape)
arr = np.frombuffer(buf[ndims+1:], dtype=self.encoded_dtype).reshape(shape)
decoded = estimate.lookup(arr, inverse)
return decoded.astype(self.decoded_dtype)

Expand Down

0 comments on commit 1a7d06a

Please sign in to comment.