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

JuliaLang / julia / #38182

15 Aug 2025 03:55AM UTC coverage: 77.87% (-0.4%) from 78.28%
#38182

push

local

web-flow
🤖 [master] Bump the SparseArrays stdlib from 30201ab to bb5ecc0 (#59263)

Stdlib: SparseArrays
URL: https://github.com/JuliaSparse/SparseArrays.jl.git
Stdlib branch: main
Julia branch: master
Old commit: 30201ab
New commit: bb5ecc0
Julia version: 1.13.0-DEV
SparseArrays version: 1.13.0
Bump invoked by: @ViralBShah
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
https://github.com/JuliaSparse/SparseArrays.jl/compare/30201abcb...bb5ecc091

```
$ git log --oneline 30201ab..bb5ecc0
bb5ecc0 fast quadratic form for dense matrix, sparse vectors (#640)
34ece87 Extend 3-arg `dot` to generic `HermOrSym` sparse matrices (#643)
095b685 Exclude unintended complex symmetric sparse matrices from 3-arg `dot` (#642)
8049287 Fix signature for 2-arg matrix-matrix `dot` (#641)
cff971d Make cond(::SparseMatrix, 1 / Inf) discoverable from 2-norm error (#629)
```

Co-authored-by: ViralBShah <744411+ViralBShah@users.noreply.github.com>

48274 of 61993 relevant lines covered (77.87%)

9571166.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

53.33
/base/traits.jl
1
# This file is a part of Julia. License is MIT: https://julialang.org/license
2

3
## numeric/object traits
4
# trait for objects that have an ordering
5
abstract type OrderStyle end
6
struct Ordered <: OrderStyle end
1,155,943✔
7
struct Unordered <: OrderStyle end
8

9
OrderStyle(instance) = OrderStyle(typeof(instance))
×
10
OrderStyle(::Type{<:Real}) = Ordered()
1,156,578✔
11
OrderStyle(::Type{<:AbstractString}) = Ordered()
×
12
OrderStyle(::Type{Symbol}) = Ordered()
12✔
13
OrderStyle(::Type{<:Any}) = Unordered()
19✔
14
OrderStyle(::Type{Union{}}, slurp...) = Ordered()
×
15

16
# trait for objects that support arithmetic
17
abstract type ArithmeticStyle end
18
struct ArithmeticRounds <: ArithmeticStyle end     # least significant bits can be lost
19
struct ArithmeticWraps <: ArithmeticStyle end      #  most significant bits can be lost
1,155,916✔
20
struct ArithmeticUnknown <: ArithmeticStyle end
21

22
ArithmeticStyle(instance) = ArithmeticStyle(typeof(instance))
×
23
ArithmeticStyle(::Type{<:AbstractFloat}) = ArithmeticRounds()
272✔
24
ArithmeticStyle(::Type{<:Integer}) = ArithmeticWraps()
1,156,303✔
25
ArithmeticStyle(::Type{<:Any}) = ArithmeticUnknown()
18✔
26
ArithmeticStyle(::Type{Union{}}, slurp...) = ArithmeticUnknown()
×
27

28
# trait for objects that support ranges with regular step
29
"""
30
    RangeStepStyle(instance)
31
    RangeStepStyle(T::Type)
32

33
Indicate whether an instance or a type supports constructing a range with
34
a perfectly regular step or not. A regular step means that
35
[`step`](@ref) will always be exactly equal to the difference between two
36
subsequent elements in a range, i.e. for a range `r::AbstractRange{T}`:
37
```julia
38
all(diff(r) .== step(r))
39
```
40

41
When a type `T` always leads to ranges with regular steps, it should
42
define the following method:
43
```julia
44
Base.RangeStepStyle(::Type{<:AbstractRange{<:T}}) = Base.RangeStepRegular()
45
```
46
This will allow [`hash`](@ref) to use an O(1) algorithm for `AbstractRange{T}`
47
objects instead of the default O(N) algorithm (with N the length of the range).
48

49
In some cases, whether the step will be regular depends not only on the
50
element type `T`, but also on the type of the step `S`. In that case, more
51
specific methods should be defined:
52
```julia
53
Base.RangeStepStyle(::Type{<:OrdinalRange{<:T, <:S}}) = Base.RangeStepRegular()
54
```
55

56
By default, all range types are assumed to be `RangeStepIrregular`, except
57
ranges with an element type which is a subtype of `Integer`.
58
"""
59
abstract type RangeStepStyle end
60
struct RangeStepRegular   <: RangeStepStyle end # range with regular step
61
struct RangeStepIrregular <: RangeStepStyle end # range with rounding error
62
RangeStepStyle(::Type{Union{}}, slurp...) = RangeStepIrregular()
×
63

64
RangeStepStyle(instance) = RangeStepStyle(typeof(instance))
×
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