While in StiefelManifold super constructor is used, in some other childs there is no super(). It leads to emptiness of properties of super class(retraction, metric).
from QGOpt/manifolds/stiefel.py from class StiefelManifold method __init__ :
def __init__(self, retraction='svd',
metric='euclidean'):
self.rank = 2
list_of_metrics = ['euclidean', 'canonical']
list_of_retractions = ['svd', 'cayley', 'qr']
if metric not in list_of_metrics:
raise ValueError("Incorrect metric")
if retraction not in list_of_retractions:
raise ValueError("Incorrect retraction")
super(StiefelManifold, self).__init__(retraction, metric)
While in StiefelManifold super constructor is used, in some other childs there is no super(). It leads to emptiness of properties of super class(retraction, metric).
from QGOpt/manifolds/stiefel.py from class StiefelManifold method __init__ :
and it has super invocation:
but in QGOpt/manifolds/hermitian.py in class HermitianMatrix there is no super invocation:
Checking emptiness of properties of super class
if add to QGOpt/manifolds/base_manifold.py this method
and then execute these tests:
We see that test_StiefelManifold() throws error:
E AttributeError: 'HermitianMatrix' object has no attribute '_metric'
but test_StiefelManifold() does not throw any error