Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_psd_dim(self):
n = 4096
self.assertEqual(cone_lib.psd_dim(cone_lib.vec_psd_dim(n)), n)
def test_dproj_psd(self):
np.random.seed(0)
for _ in range(10):
# n=55 equals k * (k + 1) / 2
self._test_dproj(
Cone(ConeType.PSD, [cone_lib.psd_dim(55)]), True, 55)
self._test_dproj(
Cone(ConeType.PSD, [cone_lib.psd_dim(55)]), False, 55)