Skip to content

Fix replace if different for index lambda#646

Merged
inducer merged 2 commits intomainfrom
fix_replace_if_different_for_index_lambda
Mar 12, 2026
Merged

Fix replace if different for index lambda#646
inducer merged 2 commits intomainfrom
fix_replace_if_different_for_index_lambda

Conversation

@kaushikcfd
Copy link
Collaborator

Provided test fails on main.

@kaushikcfd kaushikcfd requested review from inducer and majosm March 12, 2026 20:18
@inducer inducer merged commit b25c311 into main Mar 12, 2026
10 checks passed
@inducer inducer deleted the fix_replace_if_different_for_index_lambda branch March 12, 2026 20:36
@inducer
Copy link
Owner

inducer commented Mar 12, 2026

Thx!

@majosm
Copy link
Collaborator

majosm commented Mar 12, 2026

I'm too slow, but:

https://github.com/inducer/pymbolic/blob/ae07a0f041094de88e1d7d89162e03171d2520e7/pymbolic/primitives.py#L895-L897

    def __iter__(self) -> NoReturn:
        # prevent infinite loops (e.g. when inserting into numpy arrays)
        raise TypeError("expression types are not iterable")

It looks like ExpressionNode is only Iterable because this method exists... is there a way to fix that?

@majosm
Copy link
Collaborator

majosm commented Mar 12, 2026

Never mind, I see inducer/pymbolic#10.

@kaushikcfd
Copy link
Collaborator Author

Never mind, I see inducer/pymbolic#10.

Thanks for the references.

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.

3 participants