Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

inducer
Copy link
Owner

@inducer inducer commented Apr 15, 2024

Closes gh-835

cc @connorjward

@inducer inducer changed the title Work around numpy2's changed repr for scalars Work around numpy2's changed repr for scalars Apr 15, 2024
@inducer inducer enabled auto-merge (rebase) April 15, 2024 18:58
@inducer inducer disabled auto-merge April 15, 2024 19:21
@inducer
Copy link
Owner Author

inducer commented Apr 15, 2024

@connorjward It looks like the Firedrake downstream test fails with something that's inscrutable to me. Do you have a sense what could be wrong here?

@connorjward
Copy link
Contributor

@connorjward It looks like the Firedrake downstream test fails with something that's inscrutable to me. Do you have a sense what could be wrong here?

If you scroll down far enough you get to the real error:

File "/home/firedrake/firedrake/lib/python3.10/site-packages/pymbolic/mapper/__init__.py", line 155, in __call__
    return self.map_foreign(expr, *args, **kwargs)
  File "/home/firedrake/firedrake/lib/python3.10/site-packages/pymbolic/mapper/__init__.py", line 215, in map_foreign
    return self.map_constant(expr, *args, **kwargs)
  File "/home/firedrake/loopy/loopy/target/c/codegen/expression.py", line 637, in map_constant
    if isinstance(expr.integer):
AttributeError: 'numpy.int32' object has no attribute 'integer'. Did you mean: 'is_integer'?

Our callback infrastructure with PETSc sometimes hides the sources of crashes.

@inducer
Copy link
Owner Author

inducer commented Apr 16, 2024

Oh dang. Sorry I missed that, and thanks for pointing it out!

@inducer inducer enabled auto-merge (rebase) April 16, 2024 13:30
@inducer inducer merged commit 38deb28 into main Apr 16, 2024
@inducer inducer deleted the npy2-compat branch April 16, 2024 14:14
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.

Loopy does not generate valid C code with numpy 2.0 (release candidate)

2 participants