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

Unexpected behavior when using @ operator for right matrix multiplication of PaillierEncryptedNumber and numpy.ndarray #46

Open
fangxiaoran opened this issue Dec 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@fangxiaoran
Copy link
Contributor

Issue
When performing right matrix multiplication of a PaillierEncryptedNumber instance with a numpy.ndarray using @ operator, numpy.ndarray.__matmul__ is called instead of the expected PaillierEncryptedNumber.__rmatmul__.

Reproduction

  1. Instantiate a numpy.ndarray and a PaillierEncryptedNumber.
  2. Perform ndarray @ paillierencryptednumer_instance.

Expected
The PaillierEncryptedNumber.__rmatmul__ method should be called.

Environment

  • Numpy version: 1.23.1
@fangxiaoran fangxiaoran added the bug Something isn't working label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant