fpylll
fpylll copied to clipboard
feature: support slicing for IntegerMatrix
Currently, you cannot use the common slicing to access (read/write) rows/cols of IntegerMatrix
, this issue aims to add support for it.
namely:
from fpylll import IntegerMatrix
A = IntegerMatrix.random(10, "uniform", bits=8)
B = IntegerMatrix.random(5, "uniform", bits=8)
C = A[:5] # this will fail
A[5:, 5:] = B # this will also fail
additionally, since IntegerMatrixRow
didn't implement __setitem__
, we can't even A[2]=B[2]
, we should also add that in this issue.