Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to find out what numpy array cannot be serialized? #325

Open
warrenbocphet opened this issue Oct 30, 2020 · 1 comment
Open

How to find out what numpy array cannot be serialized? #325

warrenbocphet opened this issue Oct 30, 2020 · 1 comment

Comments

@warrenbocphet
Copy link

Hi all,

I created this big object where it contains a lot of numpy arrays and then used jsonpickle to encode it. And then I got the following warning:
C:\Users\Anh Tran\PycharmProjects\WAAMSoft_Python\venv\lib\site-packages\jsonpickle\ext\numpy.py:292: UserWarning: ndarray is defined by reference to an object we do not know how to serialize. A deep copy is serialized instead, breaking memory aliasing. warnings.warn(msg)

Is there anyway for me to see what is causing this warning? Thank you.

@Theelx
Copy link
Contributor

Theelx commented May 17, 2022

Sorry for the (very) late response, but that warning is because when jsonpickle checks the numpy object base attribute (the base array), it ends up not being an instance of numpy.ndarray, so jsonpickle warns that. I don't know if it's showing up for you because jsonpickle might be recursing too deep, I'd need a reproducible example from you to be sure.

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

No branches or pull requests

2 participants