Skip to content

Add test: if subset empty, dont crash#1557

Open
Sevans711 wants to merge 1 commit into
mainfrom
fix-subset-empty-crash
Open

Add test: if subset empty, dont crash#1557
Sevans711 wants to merge 1 commit into
mainfrom
fix-subset-empty-crash

Conversation

@Sevans711

Copy link
Copy Markdown
Collaborator

Closes #1285

Overview

If subset is empty, uxarray should return empty array, not crash. This seems to already be the case. But, it also seems to be the primary issue of #1285. This PR adds a test to ensure that is the case.

PR Checklist

General

  • An issue is linked created and linked
  • Add appropriate labels
  • Filled out Overview and Expected Usage (if applicable) sections

Testing

  • [N/A] Adequate tests are created if there is new functionality
  • [N/A] Tests cover all possible logical paths in your function
  • Tests are not too basic (such as simply calling a function and nothing else)

This ensures #1285 has been fixed. It looks like it was already fixed; the bug report seems to indicate the subsetting was previously crashing, rather than returning an empty UXarray. The current behavior seems to return an empty UXarray as expected.
@Sevans711 Sevans711 added the testing Test Cases label Jul 9, 2026
@Sevans711 Sevans711 requested a review from rajeeja July 9, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Test Cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bounding box subsetting error

1 participant