Skip to content

fix[eve]: use identity check for None in infer_type#2662

Merged
egparedes merged 1 commit into
GridTools:mainfrom
havogt:next_friendly_errors_eve
Jun 18, 2026
Merged

fix[eve]: use identity check for None in infer_type#2662
egparedes merged 1 commit into
GridTools:mainfrom
havogt:next_friendly_errors_eve

Conversation

@havogt

@havogt havogt commented Jun 16, 2026

Copy link
Copy Markdown
Contributor
  • infer_type used value in (None, type(None)), which invokes __eq__ and raises for values with non-boolean equality such as NumPy arrays ("The truth value of an array ... is ambiguous").
  • Switch to an identity check (value is None or value is type(None)).

'value in (None, type(None))' invokes '__eq__', which fails for values
with non-boolean equality such as NumPy arrays ('The truth value of an
array ... is ambiguous'). Compare by identity instead.

@egparedes egparedes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@egparedes egparedes merged commit aefb13c into GridTools:main Jun 18, 2026
30 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