Skip to content

Commit e136d8f

Browse files
committed
feat: make interface to Nemo more robust
1 parent bc6bc3c commit e136d8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/interfaces/nemo.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Convert a vector of polynomials to input data for msolve.
1010
function _convert_to_msolve(
1111
F::Vector{T}) where T <: MPolyRingElem
1212

13-
R = first(F).parent
13+
R = parent(first(F))
1414

1515
nr_vars = nvars(R)
1616
nr_gens = length(F)
17-
lens = Int32[F[i].length for i in 1:nr_gens]
17+
lens = Int32[length(F[i]) for i in 1:nr_gens]
1818
nr_terms = sum(lens)
1919
field_char = characteristic(R)
2020

@@ -37,7 +37,7 @@ function _convert_to_msolve(
3737
else
3838
for i in 1:nr_gens
3939
for cf in coefficients(F[i])
40-
push!(cfs, Int32(data(prime_field(base_ring(R))(cf))))
40+
push!(cfs, Int32(lift(Nemo.ZZ, cf)))
4141
end
4242
end
4343
end

0 commit comments

Comments
 (0)