I want to create a numpy subclass specialized for symmetric matrices.I want it to be just like any numpy array with only 2 differences:
- It will have 2 fields for its eigendecomposition:
U
,D
. - On construction it will force symmetry.
Likemy_symmetric_arr() = 0.5*(m+m.T)
wherem
is the regular matrix created by the default constructor.
How can that be done in the simplest way?