Skip to content

Commit

Permalink
fix: make @Tropical work again (#3336)
Browse files Browse the repository at this point in the history
- There is no `Tropical` submodule anymore
- Turn example into a doctest
  • Loading branch information
thofma committed Feb 9, 2024
1 parent f1637d7 commit 7ce63ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TropicalGeometry/poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 7ce63ff

Please sign in to comment.