Skip to content

Commit

Permalink
Fixed but in reading nested vectors of vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
iguinn committed Nov 5, 2024
1 parent 4f3743c commit 7a6e180
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lgdo/lh5/_serializers/read/vector_of_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def _h5_read_vector_of_vectors(
# grow fd_buf if necessary to hold the data
fdb_size = fd_buf_start + fd_n_rows
if len(fd_buf) < fdb_size:
fd_buf.nda.resize(fdb_size, refcheck=False)
fd_buf.resize(fdb_size)

# now read
h5o = h5py.h5o.open(h5g, b"flattened_data")
Expand Down
2 changes: 1 addition & 1 deletion src/lgdo/types/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __len__(self) -> int:

def resize(self, new_size: int) -> None:
new_shape = (new_size,) + self.nda.shape[1:]
return self.nda.resize(new_shape, refcheck=True)
return self.nda.resize(new_shape, refcheck=False)

def append(self, value: np.ndarray) -> None:
self.resize(len(self) + 1)
Expand Down

0 comments on commit 7a6e180

Please sign in to comment.