tensor: fixed indexmatrix for rank 0 tensor
This commit is contained in:
@@ -568,9 +568,12 @@ INDEXMATRIX Tensor<T>::indexmatrix() const
|
|||||||
{
|
{
|
||||||
INDEXMATRIX r;
|
INDEXMATRIX r;
|
||||||
r.resize(size(),rank());
|
r.resize(size(),rank());
|
||||||
indexmat_p = &r;
|
if(rank()>0)
|
||||||
indexmat_row = 0;
|
{
|
||||||
constloopover(indexmatrix_callback<T>,false);
|
indexmat_p = &r;
|
||||||
|
indexmat_row = 0;
|
||||||
|
constloopover(indexmatrix_callback<T>,false);
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user