@@ -79,10 +79,10 @@ diffeq = DiffEqArray(recs, t)
7979@test diffeq[:, end ] == testa[:, end ]
8080@test diffeq[:, 2 : end ] == DiffEqArray ([recs[i] for i in 2 : length (recs)], t[2 : end ])
8181@test diffeq[:, 2 : end ]. t == t[2 : end ]
82- @test diffeq[:, end - 1 : end ] == DiffEqArray ([recs[i] for i in (length (recs) - 1 ): length (recs)], t[(length (t) - 1 ): length (t)])
83- @test diffeq[:, end - 1 : end ]. t == t[(length (t) - 1 ): length (t)]
84- @test diffeq[:, end - 5 : 8 ] == DiffEqArray ([recs[i] for i in (length (t) - 5 ): 8 ], t[(length (t) - 5 ): 8 ])
85- @test diffeq[:, end - 5 : 8 ]. t == t[(length (t) - 5 ): 8 ]
82+ @test diffeq[:, ( end - 1 ) : end ] == DiffEqArray ([recs[i] for i in (length (recs) - 1 ): length (recs)], t[(length (t) - 1 ): length (t)])
83+ @test diffeq[:, ( end - 1 ) : end ]. t == t[(length (t) - 1 ): length (t)]
84+ @test diffeq[:, ( end - 5 ) : 8 ] == DiffEqArray ([recs[i] for i in (length (t) - 5 ): 8 ], t[(length (t) - 5 ): 8 ])
85+ @test diffeq[:, ( end - 5 ) : 8 ]. t == t[(length (t) - 5 ): 8 ]
8686
8787# ## (Int, Int)
8888@test testa[5 , 4 ] == testva[5 , 4 ]
@@ -157,8 +157,8 @@ diffeq = DiffEqArray(recs, t)
157157@test diffeq[:, 1 : 2 ]. t == t[1 : 2 ]
158158@test diffeq[:, 2 : end ] == DiffEqArray ([recs[i] for i in 2 : 3 ], t[2 : end ])
159159@test diffeq[:, 2 : end ]. t == t[2 : end ]
160- @test diffeq[:, end - 1 : end ] == DiffEqArray ([recs[i] for i in (length (recs) - 1 ): length (recs)], t[(length (t) - 1 ): length (t)])
161- @test diffeq[:, end - 1 : end ]. t == t[(length (t) - 1 ): length (t)]
160+ @test diffeq[:, ( end - 1 ) : end ] == DiffEqArray ([recs[i] for i in (length (recs) - 1 ): length (recs)], t[(length (t) - 1 ): length (t)])
161+ @test diffeq[:, ( end - 1 ) : end ]. t == t[(length (t) - 1 ): length (t)]
162162
163163# Test views of heterogeneous arrays (issue #453)
164164f = VectorOfArray ([[1.0 ], [2.0 , 3.0 ]])
@@ -190,7 +190,7 @@ ragged = VectorOfArray([[1.0, 2.0], [3.0, 4.0, 5.0], [6.0, 7.0, 8.0, 9.0]])
190190@test ragged[1 : end , 3 ] == [6.0 , 7.0 , 8.0 , 9.0 ]
191191@test ragged[:, end ] == [6.0 , 7.0 , 8.0 , 9.0 ]
192192@test ragged[:, 2 : end ] == VectorOfArray (ragged. u[2 : end ])
193- @test ragged[:, end - 1 : end ] == VectorOfArray (ragged. u[end - 1 : end ])
193+ @test ragged[:, ( end - 1 ) : end ] == VectorOfArray (ragged. u[( end - 1 ) : end ])
194194
195195ragged2 = VectorOfArray ([[1.0 , 2.0 , 3.0 , 4.0 ], [5.0 , 6.0 ], [7.0 , 8.0 , 9.0 ]])
196196@test ragged2[end , 1 ] == 4.0
@@ -211,7 +211,7 @@ ragged2 = VectorOfArray([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0], [7.0, 8.0, 9.0]])
211211@test ragged2[1 : (end - 1 ), 1 ] == [1.0 , 2.0 , 3.0 ]
212212@test ragged2[1 : (end - 1 ), 2 ] == [5.0 ]
213213@test ragged2[1 : (end - 1 ), 3 ] == [7.0 , 8.0 ]
214- @test ragged2[:, end - 1 : end ] == VectorOfArray (ragged2. u[end - 1 : end ])
214+ @test ragged2[:, ( end - 1 ) : end ] == VectorOfArray (ragged2. u[( end - 1 ) : end ])
215215
216216# Test that RaggedEnd and RaggedRange broadcast as scalars
217217# (fixes issue with SymbolicIndexingInterface where broadcasting over RaggedEnd would fail)
@@ -245,8 +245,8 @@ diffeq_2d = DiffEqArray(recs_2d, t)
245245@test diffeq_2d[:, 1 : 2 ]. t == t[1 : 2 ]
246246@test diffeq_2d[:, 2 : end ] == DiffEqArray (recs_2d[2 : end ], t[2 : end ])
247247@test diffeq_2d[:, 2 : end ]. t == t[2 : end ]
248- @test diffeq_2d[:, end - 1 : end ] == DiffEqArray (recs_2d[end - 1 : end ], t[end - 1 : end ])
249- @test diffeq_2d[:, end - 1 : end ]. t == t[end - 1 : end ]
248+ @test diffeq_2d[:, ( end - 1 ) : end ] == DiffEqArray (recs_2d[( end - 1 ) : end ], t[( end - 1 ) : end ])
249+ @test diffeq_2d[:, ( end - 1 ) : end ]. t == t[( end - 1 ) : end ]
250250
251251# Test DiffEqArray with 3D inner arrays (tensors)
252252recs_3d = [rand (2 , 3 , 4 ), rand (2 , 3 , 5 )]
@@ -257,8 +257,8 @@ diffeq_3d = DiffEqArray(recs_3d, t)
257257@test diffeq_3d[:, :, :, 1 : 2 ]. t == t[1 : 2 ]
258258@test diffeq_3d[:, :, :, 2 : end ] == DiffEqArray (recs_3d[2 : end ], t[2 : end ])
259259@test diffeq_3d[:, :, :, 2 : end ]. t == t[2 : end ]
260- @test diffeq_3d[:, :, :, end - 1 : end ] == DiffEqArray (recs_3d[end - 1 : end ], t[end - 1 : end ])
261- @test diffeq_3d[:, :, :, end - 1 : end ]. t == t[end - 1 : end ]
260+ @test diffeq_3d[:, :, :, ( end - 1 ) : end ] == DiffEqArray (recs_3d[( end - 1 ) : end ], t[( end - 1 ) : end ])
261+ @test diffeq_3d[:, :, :, ( end - 1 ) : end ]. t == t[( end - 1 ) : end ]
262262
263263# 2D inner arrays (matrices) with ragged second dimension
264264u = VectorOfArray ([zeros (1 , n) for n in (2 , 3 )])
0 commit comments