Skip to content

Commit

Permalink
Fixes bug which stops the selection read from actually occurring and …
Browse files Browse the repository at this point in the history
…changes to actually using the filter pipeline. At this point is failling test_reference.
  • Loading branch information
Bryan Lawrence committed Mar 3, 2024
1 parent 89aafe3 commit 96dc178
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions pyfive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"""

from .high_level import File
from .indexing import ZarrArrayStub, OrthogonalIndexer

__version__ = '0.4.0.dev'
4 changes: 2 additions & 2 deletions pyfive/dataobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ def _get_chunk_addresses(self):
for node in self.chunk_btree.all_nodes[0]:
for node_key, addr in zip(node['keys'], node['addresses']):
size = node_key['chunk_size']
if self._filter_pipeline:
if self.filter_pipeline:
# I am not sure this varies per chunk, but in case it does
filter_mask = node_key['filter_mask']
else:
Expand All @@ -768,7 +768,7 @@ def _get_selection_via_chunks(self, args):
for chunk_coords, chunk_selection, out_selection in indexer:
addr, chunk_buffer_size, filter_mask = self.get_chunk_details(chunk_coords)
chunk_buffer = self.chunk_btree.get_one_chunk_buffer(
addr, chunk_buffer_size, itemsize, self._filter_pipeline, filter_mask)
addr, chunk_buffer_size, itemsize, self.filter_pipeline, filter_mask)
chunk_data = np.frombuffer(chunk_buffer, dtype=self.dtype)
out[out_selection] = chunk_data.reshape(self.chunks, order=self.order)[chunk_selection]

Expand Down
2 changes: 1 addition & 1 deletion pyfive/high_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def __repr__(self):
return '<HDF5 dataset "%s": shape %s, type "%s">' % info

def __getitem__(self, args):
data = self._dataobjects.get_data()[args]
data = self._dataobjects.get_data(args)
if self._astype is None:
return data
return data.astype(self._astype)
Expand Down

0 comments on commit 96dc178

Please sign in to comment.