Skip to content

PyTorch Example: Warning on Array to NumPy/CuPy #903

@ax3l

Description

@ax3l

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions