-
Notifications
You must be signed in to change notification settings - Fork 215
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
fix numpy array incompatability #658
fix numpy array incompatability #658
Conversation
Hi! Thank you for the PR. I'll check it out this week after the bug-fixing session |
Hi @roman-right |
Hi @riven314 , Sorry for the delay. The bug-fixing session finished yesterday. Regarding the PR. It is not obvious, what is happening there. Can you use custom encoder for you case? https://beanie-odm.dev/tutorial/defining-a-document/#encoders |
@roman-right
and the error still happens with customer encoder. when I trace the source code, I found that it got into error before the data is passed to the customer encoder, so this PR aims to resolve this error |
I see. There are overridden magic methods in numpy arrays; that's why it cannot be simply compared. However, you detect this through indirect signs. It will work, but it won't be obvious. I'll think about how I can make this a bit more apparent. |
I've updated the check a bit. |
thx a lot for the update! |
Problem:
Current implementation raises error when a collection contains fields of type
np.ndarray
How to Reproduce:
docker-compose.yml
:docker-compose up -d