-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
backend: openmpSpecific to OpenMP execution (CPUs)Specific to OpenMP execution (CPUs)component: pythonPython bindingsPython bindingscomponent: testsexamples, tests and benchmarksexamples, tests and benchmarkswarning
Description
Warning is sensible (we do not want to copy):
271: /home/axel/src/impactx/examples/pytorch_surrogate_model/run_ml_surrogate_15_stage.py:238: DeprecationWarning: __array__ implementation doesn't accept a copy keyword, so passing copy=False failed. __array__ must implement 'dtype' and 'copy' keyword arguments. To learn more, see the migration guide https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword
271: x[:] = array(data_arr_post_model[:, 0])
https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword
We can do two updates:
- ImpactX example: use our new
.to_xp()
functions to generalize NumPy/CuPy coupling. - pyAMReX: update the
.to_np()
method Modernize.to_numpy()
AMReX-Codes/pyamrex#426
Metadata
Metadata
Assignees
Labels
backend: openmpSpecific to OpenMP execution (CPUs)Specific to OpenMP execution (CPUs)component: pythonPython bindingsPython bindingscomponent: testsexamples, tests and benchmarksexamples, tests and benchmarkswarning