From 7ce63ff6f1a7cd2e43ee6339392a78fbae36af61 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Fri, 9 Feb 2024 15:24:24 +0100 Subject: [PATCH] fix: make @tropical work again (#3336) - There is no `Tropical` submodule anymore - Turn example into a doctest --- src/TropicalGeometry/poly.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/TropicalGeometry/poly.jl b/src/TropicalGeometry/poly.jl index 2934320d1d06..a165794f0a31 100644 --- a/src/TropicalGeometry/poly.jl +++ b/src/TropicalGeometry/poly.jl @@ -97,13 +97,13 @@ Translate the expression in the tropical world. # Examples -```jlexample +```jldoctest julia> T = tropical_semiring(min); -julia> Tx, x = Tropical.polynomial_ring(T, "x" => 1:3); +julia> Tx, x = polynomial_ring(T, "x" => 1:3); julia> @tropical min(1, x[1], x[2], 2*x[3]) -x[1] + x[2] + x[3]^2 + (1) +x[3]^2 + x[1] + x[2] + (1) ``` """ macro tropical(expr) @@ -123,7 +123,7 @@ function _tropicalize(x::Expr) x.args[1] = :(+) elseif x.args[1] == :(*) length(x.args) <= 3 || error("Cannot convert") - x.args[1] = :(Tropical._tropical_mul) + x.args[1] = :(Oscar._tropical_mul) elseif x.args[1] == :(+) x.args[1] = :* else