Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make VoxelSize iterable and array-like, remove .is_valid #310

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

qin-yu
Copy link
Collaborator

@qin-yu qin-yu commented Sep 10, 2024

This PR fixes two things:

  1. voxel_size.voxel_size has been used to get the actual tuple, which is not neat. Now one either uses it directly and let the __len__, __iter__, and __array__ handle None; or it can be turned into tuple by builtin tuple()
  2. There has been an .is_valid property, which doesn't really work with type checkers and is almost not used at all. I safely removed it in favour of checking None directly.

@qin-yu qin-yu self-assigned this Sep 10, 2024
@qin-yu qin-yu added the enhancement New feature or request label Sep 10, 2024
@qin-yu qin-yu merged commit 054143c into plantsegv2 Sep 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant