Skip to content

Commit

Permalink
Merge branch 'master' into array_array_rational
Browse files Browse the repository at this point in the history
  • Loading branch information
benlorenz authored Mar 10, 2020
2 parents 49aa80c + 336fe65 commit 6de9840
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deps/src/polymake_polynomial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void polymake_module_add_polynomial(jlcxx::Module& polymake)
wrapped.method("monomials_as_matrix", [](polyT& a) { return a.monomials_as_matrix(); });
wrapped.method("set_var_names", [](polyT& a, Array<std::string>& names) { a.set_var_names(names); });
wrapped.method("get_var_names", [](polyT& a) { return a.get_var_names(); });
wrapped.method("nvars", &polyT::n_vars);
wrapped.method("nvars", [] (polyT& a) -> pm::Int { return a.n_vars(); });

wrapped.method("show_small_obj", [](polyT& P) {
return show_small_object<polyT>(P);
Expand Down
1 change: 1 addition & 0 deletions test/polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ using SparseArrays
for (C,s) in [(Int64, "long"), (Polymake.Integer, "pm::Integer"), (Polymake.Rational, "pm::Rational"), (Float64, "double")]
p = Polymake.Polynomial(C.(jl_v),jl_m)
@test Polymake.nvars(p) == size(jl_m)[2]
@test Polymake.nvars(p) isa Int
# the following line is only necessary if the tests are run with an active session of Polymake
# because variable names are global for the specific typing; ["x"] is its default value
Polymake.set_var_names(p,["x"])
Expand Down

0 comments on commit 6de9840

Please sign in to comment.