We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f34a3a8 commit 7c4ffaeCopy full SHA for 7c4ffae
test/arrayops.jl
@@ -146,6 +146,22 @@ for idx in ((3,), (2,2), (Base.ReshapedIndex(1),))
146
end
147
148
149
+# conversion from ReshapedArray to Array (#18262)
150
+a = Base.ReshapedArray(1:3, (3, 1), ())
151
+@test convert(Array, a) == a
152
+@test convert(Array{Int}, a) == a
153
+@test convert(Array{Float64}, a) == a
154
+@test convert(Matrix, a) == a
155
+@test convert(Matrix{Int}, a) == a
156
+@test convert(Matrix{Float64}, a) == a
157
+b = Base.ReshapedArray(1:3, (3,), ())
158
+@test convert(Array, b) == b
159
+@test convert(Array{Int}, b) == b
160
+@test convert(Array{Float64}, b) == b
161
+@test convert(Vector, b) == b
162
+@test convert(Vector{Int}, b) == b
163
+@test convert(Vector{Float64}, b) == b
164
+
165
# operations with LinearFast ReshapedArray
166
b = collect(1:12)
167
a = Base.ReshapedArray(b, (4,3), ())
0 commit comments