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

JuliaLang / julia / #37874 / 1
77%
master: 77%

Build:
DEFAULT BRANCH: master
Ran 18 Aug 2024 11:15AM UTC
Files 361
Run time 9s
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.1

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
```

78117 of 88940 relevant lines covered (87.83%)

15422246.08 hits per line

Source Files on job #37874.1
  • Tree
  • List 361
  • Changed 267
  • Source Changed 0
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 37874
  • dff0f55e on github
  • Prev Job for on master (##37873.1)
  • Next Job for on master (##37875.1)
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