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

New iterator pattern [wip] #192

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tlambert03
Copy link
Member

very very wip example that would solve #156 and #5 and #137

This commit refactors the AxisIterator and TimePlan classes in the example.py file. The changes include:
- Adding type hints and annotations to improve code readability and maintainability.
- Renaming the `length` method in AxisIterator to `num_timepoints` for clarity.
- Adding a new `deltas` method to TimePlan to iterate over the time deltas between timepoints.
- Handling the case of an infinite sequence in the `num_timepoints` method of TimePlan.

These changes improve the overall structure and functionality of the code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant