Skip to content

Replace some uses of Array by Vector or Matrix#60154

Merged
fingolfin merged 1 commit intomasterfrom
mh/Array-to-VecMat
Nov 23, 2025
Merged

Replace some uses of Array by Vector or Matrix#60154
fingolfin merged 1 commit intomasterfrom
mh/Array-to-VecMat

Conversation

@fingolfin
Copy link
Copy Markdown
Member

Progress towards issue #56922 by @LilithHafner. Turns out I didn't find many uses of Array{T, 1} or Array{T, 2} in doc or base that were "clearly" in need of being updated to Vector or Matrix.

There are a bunch that can't be changed because they occur before Vector or Matrix are even defined.

There are a couple borderline cases, and I may have overlooked some, but most I looked at felt like "I could change it to Vector or Matrix but I think there is a didactical point in using Array here. E.g. in the definition of struct BitVector <: AbstractArray{Bool, 1}; end I think the context makes it desirable to leave it at that instead of changing it to Vector -- but I admit this is subjective.

There was more in test, though that's perhaps less important.

All in all I think we could close #56922

@LilithHafner
Copy link
Copy Markdown
Member

CI failures look real.

This looks quite reasonable.

Changing tests is much less important and also I wouldn't want to entirely eliminate Array{T, 1} and Array{T, 2} in tests, just for coverage.

@fingolfin
Copy link
Copy Markdown
Member Author

Oh yeah the test failure was real and stupid, should be fixed now (well, that one at least; there might be more -- I'll check the CI logs once things have run through)

@fingolfin
Copy link
Copy Markdown
Member Author

As far as I can tell the errors are CI "normal" (unfortunately) right now

@fingolfin fingolfin merged commit 21f3b37 into master Nov 23, 2025
6 of 9 checks passed
@fingolfin fingolfin deleted the mh/Array-to-VecMat branch November 23, 2025 15:47
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.

Replace Array{T, 1} with Vector{T} and Array{T, 2} with Matrix{T}

2 participants