Skip to content

Commit 40127ab

Browse files
authored
Merge pull request #37 from thofma/th/gfswap2
Make Nemo interface more robust
2 parents bc6bc3c + 3999b80 commit 40127ab

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AlgebraicSolving"
22
uuid = "66b61cbe-0446-4d5d-9090-1ff510639f9d"
33
authors = ["ederc <[email protected]>", "Mohab Safey El Din <[email protected]", "Rafael Mohr <[email protected]>"]
4-
version = "0.4.4"
4+
version = "0.4.5"
55

66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

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)