Yes. By the way, if you want to convert to Matrix{Int}
, the correct way would be
julia> A = QQFieldElem[1 0 0; 0 1 1; 0 3 0; 0 0 1]
4×3 Matrix{QQFieldElem}:
1 0 0
0 1 1
0 3 0
0 0 1
julia> map(x -> Int(ZZ(x)), A)
4×3 Matrix{Int64}:
1 0 0
0 1 1
0 3 0
0 0 1
The version with x.num
will give (silently) wrong results:
julia> A = QQFieldElem[1 0 0; 0 1 1; 0 3 0; 0 0 18446744073709551615]
4×3 Matrix{QQFieldElem}:
1 0 0
0 1 1
0 3 0
0 0 18446744073709551615
julia> Aint = conv2int(A)
4×3 Matrix{Int64}:
1 0 0
0 1 1
0 3 0
0 0 4611686018537972628