Skip to content

Commit

Permalink
Fixing encoding of second operand for BGV
Browse files Browse the repository at this point in the history
  • Loading branch information
ibarrond committed Jun 12, 2023
1 parent 02decae commit 105b0dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Pyfhel/PyCtxt.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,8 @@ cdef class PyCtxt:
(np.issubdtype(other.dtype, np.number)):
if self.scheme == Scheme_t.bfv:
return self._pyfhel.encodeInt(other.astype(np.int64)[:nslots])
elig self.scheme == Scheme_t.bgv:
return self._pyfhel.encodeBGV(other.astype(np.int64)[:nslots])
elif self.scheme == Scheme_t.ckks:
if np.issubdtype(other.dtype, np.complexfloating):
return self._pyfhel.encodeComplex(other.astype(complex)[:nslots])
Expand Down

0 comments on commit 105b0dd

Please sign in to comment.