1
1
using StaticArrays, ArrayInterfaceCore, ArrayInterfaceStaticArraysCore, Test
2
2
3
3
x = @SVector [1 ,2 ,3 ]
4
- @test ArrayInterface . ismutable (x) == false
5
- @test ArrayInterface . ismutable (view (x, 1 : 2 )) == false
6
- @test ArrayInterface . can_setindex (typeof (x)) == false
7
- @test ArrayInterface . buffer (x) == x. data
4
+ @test ArrayInterfaceCore . ismutable (x) == false
5
+ @test ArrayInterfaceCore . ismutable (view (x, 1 : 2 )) == false
6
+ @test ArrayInterfaceCore . can_setindex (typeof (x)) == false
7
+ @test ArrayInterfaceCore . buffer (x) == x. data
8
8
9
9
x = @MVector [1 ,2 ,3 ]
10
- @test ArrayInterface . ismutable (x) == true
11
- @test ArrayInterface . ismutable (view (x, 1 : 2 )) == true
10
+ @test ArrayInterfaceCore . ismutable (x) == true
11
+ @test ArrayInterfaceCore . ismutable (view (x, 1 : 2 )) == true
12
12
13
13
A = @SMatrix (randn (5 , 5 ))
14
- @test ArrayInterface . lu_instance (A) isa typeof (lu (A))
14
+ @test ArrayInterfaceCore . lu_instance (A) isa typeof (lu (A))
15
15
A = @MMatrix (randn (5 , 5 ))
16
- @test ArrayInterface . lu_instance (A) isa typeof (lu (A))
16
+ @test ArrayInterfaceCore . lu_instance (A) isa typeof (lu (A))
17
17
18
18
x = @SMatrix rand (Float32, 2 , 2 )
19
19
y = @SVector rand (4 )
20
- yr = ArrayInterface . restructure (x, y)
20
+ yr = ArrayInterfaceCore . restructure (x, y)
21
21
@test yr isa SMatrix{2 , 2 }
22
22
@test Base. size (yr) == (2 ,2 )
23
23
@test vec (yr) == vec (y)
24
24
z = rand (4 )
25
- zr = ArrayInterface . restructure (x, z)
25
+ zr = ArrayInterfaceCore . restructure (x, z)
26
26
@test zr isa SMatrix{2 , 2 }
27
27
@test Base. size (zr) == (2 ,2 )
28
28
@test vec (zr) == vec (z)
0 commit comments