From da923ca2f583ad9f8dcffdcabe486d7f60d3d1b5 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Wed, 8 Jan 2025 11:33:01 +0530 Subject: [PATCH] fix: minor bug fix in `PolynomialTransformation` --- src/systems/nonlinear/homotopy_continuation.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/systems/nonlinear/homotopy_continuation.jl b/src/systems/nonlinear/homotopy_continuation.jl index 00c6c7f1b0..09e11199e8 100644 --- a/src/systems/nonlinear/homotopy_continuation.jl +++ b/src/systems/nonlinear/homotopy_continuation.jl @@ -348,7 +348,8 @@ function PolynomialTransformation(sys::NonlinearSystem) # Is there a better way to check for uniqueness? `simplify` is relatively slow # (maybe use the threaded version?) and `expand` can blow up expression size. # Could metatheory help? - all_non_poly_terms = mapreduce(d -> d.non_polynomial_terms, vcat, polydata) + all_non_poly_terms = mapreduce( + d -> d.non_polynomial_terms, vcat, polydata; init = BasicSymbolic[]) unique!(all_non_poly_terms) # each variable can only be replaced by one non-polynomial expression involving