tensor: indexmatrix() and zero index detection

This commit is contained in:
2026-01-27 17:41:47 +01:00
parent 1580891639
commit 1d53afd257
3 changed files with 68 additions and 11 deletions

2
t.cc
View File

@@ -4597,6 +4597,8 @@ Tensor<double> x(shape); x.randomize(1.);
x.defaultnames();
cout <<"x= "<<x.shape << " "<<x.names<<endl;
cout <<"indexmatrix of x = "<<x.indexmatrix();
NRVec<INDEXGROUP> yshape(2);
yshape[0].number=1;
yshape[0].symmetry=0;