SymmetricTensor.copy() crashes with TypeError: 'NoneType' object is not iterable when called on a view whose shape no longer matches the declared symmetric axes:
whest/src/whest/_symmetric.py:785
out._symmetric_axes = list(self._symmetric_axes) # self._symmetric_axes is None
Reproducer:
A = we.symmetrize(we.random.randn(10, 10), group=we.PermutationGroup.symmetric(2,axes=(0,1)))
we.diagonal(A).copy()
we.diagonal returns a 1D view; __array_finalize__ correctly invalidates _symmetric_axes to None for the new shape; but .copy() then tries to list(None).
SymmetricTensor.copy()crashes withTypeError: 'NoneType' object is not iterablewhen called on a view whose shape no longer matches the declared symmetric axes:Reproducer:
we.diagonalreturns a 1D view;__array_finalize__correctly invalidates_symmetric_axestoNonefor the new shape; but.copy()then tries tolist(None).