We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99a76e1 commit 129ab75Copy full SHA for 129ab75
NDTensors/test/test_dense.jl
@@ -38,6 +38,11 @@ NDTensors.dim(i::MyInd) = i.dim
38
39
Aview = A[2:3, 2:3]
40
@test dims(Aview) == (2, 2)
41
+ ## Added for issue 1431 create a tensor from
42
+ ## a sliced view of another tensor
43
+ Acopy = Tensor(NDTensors.storage(Aview), (1,4))
44
+ @test @allowscalar data(Acopy) == data(Aview)
45
+ @test dims(Acopy) == (1,4)
46
47
B = dev(Tensor(elt, undef, (3, 4)))
48
randn!(B)
0 commit comments