• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37874
77%

Build:
DEFAULT BRANCH: master
Ran 18 Aug 2024 11:15AM UTC
Jobs 1
Files 361
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Aug 2024 04:20AM UTC coverage: 87.831% (+0.04%) from 87.789%
#37874

push

local

web-flow
Avoid using zero for the eltype in `tr(::Matrix)` (#55519)

This lets us compute the `tr` for `Matrix`es where the `eltype` does not
have a zero, but we may sum over the diagonal.
E.g. the following works after this:
```julia
julia> M = fill([1 2; 3 4], 2, 2)
2×2 Matrix{Matrix{Int64}}:
 [1 2; 3 4]  [1 2; 3 4]
 [1 2; 3 4]  [1 2; 3 4]

julia> tr(M)
2×2 Matrix{Int64}:
 2  4
 6  8
```

Also, using linear indexing over Cartesian appears to provide a slight
speed-up for small to mid-sized matrices:
```julia
julia> A = rand(1000,1000);

julia> @btime tr($A);
  1.796 μs (0 allocations: 0 bytes) # nightly
  1.524 μs (0 allocations: 0 bytes) # This PR
```

3 of 3 new or added lines in 1 file covered. (100.0%)

8 existing lines in 5 files now uncovered.

78117 of 88940 relevant lines covered (87.83%)

15422246.08 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.91
-0.41% stdlib/Random/src/generation.jl
1
89.62
-0.05% base/compiler/tfuncs.jl
1
90.15
-0.17% stdlib/LinearAlgebra/src/matmul.jl
2
93.72
-0.17% base/bitarray.jl
3
89.01
-3.21% stdlib/LinearAlgebra/src/factorization.jl
Jobs
ID Job ID Ran Files Coverage
1 #37874.1 18 Aug 2024 11:15AM UTC 361
87.83
Source Files on build #37874
  • Tree
  • List 361
  • Changed 267
  • Source Changed 0
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • dff0f55e on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc