Skip to content

Cannot serialize arrays #2602

@david-cortes-intel

Description

@david-cortes-intel

This throws an error:

import numpy as np
import dpnp
import pickle
x = dpnp.array(
    np.sqrt(np.arange(10)).astype(np.float32),
    device="gpu",
)
pickle.dumps(x)
File <stringsource>:2, in dpctl.tensor._usmarray.usm_ndarray.__reduce_cython__()

TypeError: no default __reduce__ due to non-trivial __cinit__

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions