You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/reinterpretarray.jl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -165,7 +165,7 @@ let a = [0.1 0.2; 0.3 0.4], at = reshape([(i,i+1) for i = 1:2:8], 2, 2)
165
165
@test r[1,2] ===reinterpret(Int64, v[1,2])
166
166
@test r[0,3] ===reinterpret(Int64, v[0,3])
167
167
@test r[1,3] ===reinterpret(Int64, v[1,3])
168
-
@test_throwsArgumentError("cannot reinterpret a `Float64` array to `UInt32` when the first axis is Base.IdentityUnitRange(0:1). Try reshaping first.") reinterpret(UInt32, v)
168
+
@test_throwsArgumentError("cannot reinterpret a `Float64` array to `UInt32` when the first axis is OffsetArrays.IdOffsetRange(0:1). Try reshaping first.") reinterpret(UInt32, v)
169
169
v =OffsetArray(a, (0, 1))
170
170
r =reinterpret(UInt32, v)
171
171
axsv =axes(v)
@@ -184,7 +184,7 @@ let a = [0.1 0.2; 0.3 0.4], at = reshape([(i,i+1) for i = 1:2:8], 2, 2)
184
184
offsetvt = (-2, 4)
185
185
vt =OffsetArray(at, offsetvt)
186
186
istr =string(Int)
187
-
@test_throwsArgumentError("cannot reinterpret a `Tuple{$istr, $istr}` array to `$istr` when the first axis is Base.IdentityUnitRange(-1:0). Try reshaping first.") reinterpret(Int, vt)
187
+
@test_throwsArgumentError("cannot reinterpret a `Tuple{Int64, Int64}` array to `Int64` when the first axis is OffsetArrays.IdOffsetRange(-1:0). Try reshaping first.") reinterpret(Int, vt)
188
188
vt =reshape(vt, 1:1, axes(vt)...)
189
189
r =reinterpret(Int, vt)
190
190
@test r ==OffsetArray(reshape(1:8, 2, 2, 2), (0, offsetvt...))
0 commit comments