Commit 9efd351
authored
Fix tensorstore empty array handling (#326)
* Fix tensorstore empty array handling
- Add validation for empty arrays in _save_transformed before tensorstore write
- Skip write operations for empty arrays with warning messages
- Add comprehensive error handling with detailed diagnostics for tensorstore failures
- Improve error messages to include array shapes, sizes, and tensorstore details
This resolves the ValueError: Error aligning dimensions issue when empty arrays
are passed to tensorstore write operations.
* Add empty results check to prevent tensorstore alignment errors
Adds validation in apply_transform_to_tczyx_and_save() to check for empty
results dictionary before calling _save_transformed(). When no valid time
points are available, logs diagnostic message and skips write operation
instead of attempting to write empty arrays to tensorstore, which causes
alignment dimension mismatches.
* Revert "Fix tensorstore empty array handling"
This reverts commit 65c9ddb.
* better handling of output_time_indices
* style1 parent ffc8a9d commit 9efd351
1 file changed
Lines changed: 17 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
411 | 410 | | |
412 | | - | |
| 411 | + | |
413 | 412 | | |
414 | 413 | | |
415 | 414 | | |
| |||
418 | 417 | | |
419 | 418 | | |
420 | 419 | | |
421 | | - | |
| 420 | + | |
422 | 421 | | |
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
426 | 425 | | |
427 | 426 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
434 | 442 | | |
435 | 443 | | |
436 | 444 | | |
| |||
0 commit comments