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

No method matching setindex!(::fmpz_mat, ::fmpz, ::Int64) #1203

Closed
albinahlback opened this issue Nov 14, 2021 · 2 comments
Closed

No method matching setindex!(::fmpz_mat, ::fmpz, ::Int64) #1203

albinahlback opened this issue Nov 14, 2021 · 2 comments

Comments

@albinahlback
Copy link
Contributor

julia> b = fmpz_mat(1, 3)
[0   0   0]

julia> b[2] = ZZ(2)
ERROR: MethodError: no method matching setindex!(::fmpz_mat, ::fmpz, ::Int64)

However, we have

julia> b[2]
0

I suppose it's similar for other structs.

@wbhart
Copy link
Contributor

wbhart commented Nov 16, 2021

The main reason we haven't provided setindex! is that Julia is column major, whereas Flint is row major. This cause general could in confusion.

However, we could support it for vectors only, now that this seems to be a thing in Nemo.

@lgoettgens
Copy link
Collaborator

Resolved by Nemocas/AbstractAlgebra.jl#1407.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants