Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import Base.trunc #1536

Merged
merged 1 commit into from
Sep 19, 2023
Merged

import Base.trunc #1536

merged 1 commit into from
Sep 19, 2023

Conversation

ThomasBreuer
Copy link
Collaborator

Without this change, Base.trunc is different from Nemo.trunc, and the following happens.

julia> using Oscar
[...]

julia> trunc
WARNING: both Oscar and Base export "trunc"; uses of it in module Main must be qualified
ERROR: UndefVarError: trunc not defined

(I noticed this problem when a function for tab completion ran over the variables in Main, which triggered the warning.)

@fingolfin
Copy link
Member

Hmm, tests fail in an (to me) unexpected way:

ComplexMat.charpoly: Error During Test at /home/runner/work/Nemo.jl/Nemo.jl/test/arb/ComplexMat-test.jl:364
  Got exception outside of a @test
  MethodError: no method matching charpoly(::ComplexPolyRing, ::ComplexMat)
  Closest candidates are:
    charpoly(::AcbPolyRing, ::ComplexMat) at /home/runner/work/Nemo.jl/Nemo.jl/src/arb/ComplexMat.jl:521
    charpoly(::AcbPolyRing, ::ComplexMat, ::Int64) at /home/runner/work/Nemo.jl/Nemo.jl/src/arb/ComplexMat.jl:521
    charpoly(::PolyRing{T}, ::MatrixElem{T}) where T<:RingElement at /home/runner/.julia/packages/AbstractAlgebra/Ry0na/src/Matrix.jl:4318
  Stacktrace:
    [1] macro expansion
      @ ~/work/Nemo.jl/Nemo.jl/test/arb/ComplexMat-test.jl:375 [inlined]

@ThomasBreuer
Copy link
Collaborator Author

Locally, I get the error also in Nemo's current master branch:

julia> using Nemo

Welcome to Nemo version 0.35.3

Nemo comes with absolutely no warranty whatsoever


julia> CC = ComplexField()
Complex field

julia> S = matrix_space(CC, 3, 3)
Matrix space of 3 rows and 3 columns
  over complex field

julia> R, x = polynomial_ring(CC, "x")
(Univariate polynomial ring in x over CC, x)

julia> A = S(["2.0 +/- 0.1" "3.0 +/- 0.1" "5.0 +/- 0.1";
                 "0.0 +/- 0.1" "4.0 +/- 0.1" "7.0 +/- 0.1";
                 "0.0 +/- 0.1" "0.0 +/- 0.1" "3.0 +/- 0.1"])
[[2e+0 +/- 0.101]   [3e+0 +/- 0.101]   [5e+0 +/- 0.101]]
[     [+/- 0.101]   [4e+0 +/- 0.101]   [7e+0 +/- 0.101]]
[     [+/- 0.101]        [+/- 0.101]   [3e+0 +/- 0.101]]

julia> g = charpoly(R, A)
ERROR: MethodError: no method matching charpoly(::ComplexPolyRing, ::ComplexMat)
[...]

@fingolfin fingolfin mentioned this pull request Sep 18, 2023
@fingolfin
Copy link
Member

See #1537

@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Merging #1536 (c0886ac) into master (9de7949) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1536      +/-   ##
==========================================
- Coverage   84.03%   84.02%   -0.01%     
==========================================
  Files          94       94              
  Lines       36613    36613              
==========================================
- Hits        30767    30765       -2     
- Misses       5846     5848       +2     
Files Changed Coverage Δ
src/Nemo.jl 29.41% <ø> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ThomasBreuer
Copy link
Collaborator Author

The required test OscarCI / matching: [Oscar#master,Hecke#master,Singular#master] - ubuntu-latest, julia ~1.9.0-0 failed,
it got canceled after 2h 22m 18s:

Mon, 18 Sep 2023 14:38:52 GMT
Run echo 'using Pkg;Pkg.test("Oscar");Pkg.test("Hecke"; test_args=["short"]);Pkg.test("Singular");'
Mon, 18 Sep 2023 14:38:52 GMT using Pkg;Pkg.test("Oscar");Pkg.test("Hecke"; test_args=["short"]);Pkg.test("Singular");
Mon, 18 Sep 2023 14:38:54 GMT      Testing Oscar
[...]
Mon, 18 Sep 2023 16:47:39 GMT Test Summary:   | Pass  Total     Time
Mon, 18 Sep 2023 16:47:39 GMT GlobalFundClass |    4      4  5m03.7s
Mon, 18 Sep 2023 17:01:09 GMT
Mon, 18 Sep 2023 17:01:09 GMT [2148] signal (15): Terminated
Mon, 18 Sep 2023 17:01:09 GMT in expression starting at none:1
Mon, 18 Sep 2023 17:01:10 GMT Error: The operation was canceled.

@fingolfin fingolfin enabled auto-merge (squash) September 19, 2023 06:27
@fingolfin fingolfin merged commit f89c878 into Nemocas:master Sep 19, 2023
14 of 15 checks passed
@ThomasBreuer ThomasBreuer deleted the TB_trunc branch September 19, 2023 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants