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

Support enumerate in conditional generators/comprehensions #1525

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

BioTurboNick
Copy link
Contributor

@BioTurboNick BioTurboNick commented Sep 17, 2024

Trying to differentiate over a comprehension or generator over enumerate with a conditional errors because the tangent input will contain nothing instead of Tuple{Nothing, T}, and the mapped last to extract the T value fails.

This PR adds a back method for this case which maps nothing to nothing, and otherwise taking last.

PR Checklist

  • Tests are added
  • Documentation, if applicable - does not appear to be applicable

@BioTurboNick
Copy link
Contributor Author

Nightly failure appears unrelated

@BioTurboNick
Copy link
Contributor Author

BioTurboNick commented Sep 18, 2024

@Keno - would you be able to review this and my other PR here? Saw you committed the last version pushed to the registry.

EDIT: Or perhaps @ToucheSir or @lxvm ?

Copy link
Member

@ToucheSir ToucheSir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ToucheSir ToucheSir merged commit f17ba75 into FluxML:master Sep 22, 2024
12 of 13 checks passed
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.

2 participants