fpylll icon indicating copy to clipboard operation
fpylll copied to clipboard

feature: support slicing for IntegerMatrix

Open alxiong opened this issue 7 months ago • 0 comments

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.

alxiong avatar Jan 26 '24 03:01 alxiong