-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[c++,python] Fix default reads on unwritten dense arrays (#3136)
* Found issue while working on spatial's `MultiscaleImage` and erroring out when applying `read_spatial_region` to a level that had not been written to yet * Add new `non_empty_domain_slot_opt` alongside `non_empty_domain_slot` that returns `std::nullopt` if it is empty rather than (0, 0) * Fix logic in C++ `ManagedQuery::setup_read` to check if the array has been written to yet. If it hasn't, set the subarray to use soma_dim_0's full domain. Otherwise, use the non-empty domain as before * Also fix logic in Python `DenseNDArray.read` to use the new `non_empty_domain_slot_opt` and correctly set the `data_shape` to the full domain if the array has not been written to yet * Add unit test in pytest * Update all tests to reflect fix
- Loading branch information
Showing
6 changed files
with
150 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters