| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Does anyone want to review this @deinst @GiacomoPope or should I just merge? |
Sorry, something went wrong.
|
I had a quick look and it looks good. Nice work with the tests and aligning the other matrix types with this new addition. |
Sorry, something went wrong.
|
Thanks. Writing the generic test code would be a lot easier if we had a more uniform interface for the different types wrt contexts e.g.: Rs = [fmpz_ctx(), fmpq_ctx(), nmod_ctx(7), fmpz_mod_ctx(7), ...]
for R in Rs:
a = R(2)
p = R.poly([1, 2])
M = R.matrix([[1, 2], [3, 4]])
assert M.charpoly() == R.poly([1, 2, 3])
...
Working on this has made it clear that a uniform interface is worthwhile so I think I will add that soon. |
Sorry, something went wrong.
|
Okay, let's get this in. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Since fmpz_mod and fmpz_mod_poly were recently added (gh-87 gh-83) this PR adds the corresponding matrix type fmpz_mod_mat.
The tests added are mostly generic tests applied to the 4 exact matrix types fmpz_mat, fmpq_mat, nmod_mat and fmpz_mod_mat. Various methods are added to some of the other types so that they have more consistent interfaces. Also some exception types were changed and some cases where Flint would abort are now handled with Python exceptions (e.g. charpoly on a non-square matrix).
Also nmod_mat now subclasses flint_mat along with the other matrix types and the matrix printing was made more consistent in how ctx.pretty is handled.