tensor: use canonicalize_shape in flatten

This commit is contained in:
2025-11-12 14:59:46 +01:00
parent 641b632df1
commit ee3687ac36

View File

@@ -871,8 +871,7 @@ if(is_flat())
if(has_symmetry()) //get rid of formal symemtry if(has_symmetry()) //get rid of formal symemtry
{ {
Tensor<T> r(*this); Tensor<T> r(*this);
r.shape.copyonwrite(); r.canonicalize_shape();
for(int g=0; g<r.shape.size(); ++g) r.shape[g].symmetry=0;
return r; return r;
} }
else else