Skip to content

Commit 68f7c0d

Browse files
committed
Switch to eprint for vebosity message in InflationSDP
1 parent 3511bac commit 68f7c0d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

inflation/sdp/InflationSDP.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def generate_relaxation(self,
322322
self.build_columns(column_specification)
323323
collect()
324324
if self.verbose > 0:
325-
print("Number of columns in the moment matrix:", self.n_columns)
325+
eprint("Number of columns in the moment matrix:", self.n_columns)
326326

327327
# Calculate the moment matrix without the inflation symmetries
328328
unsymmetrized_mm, unsymmetrized_corresp = \
@@ -334,7 +334,7 @@ def generate_relaxation(self,
334334
else "")
335335
if 0 in unsymmetrized_mm.flat:
336336
additional_var = 1
337-
print("Number of variables" + extra_msg + ":",
337+
eprint("Number of variables" + extra_msg + ":",
338338
len(unsymmetrized_corresp) + additional_var)
339339

340340
# Calculate the inflation symmetries
@@ -351,7 +351,7 @@ def generate_relaxation(self,
351351
if self.verbose > 0:
352352
extra_msg = (" after symmetrization" if symmetrization_required
353353
else "")
354-
print(f"Number of variables{extra_msg}: "
354+
eprint(f"Number of variables{extra_msg}: "
355355
+ f"{len(self.symmetrized_corresp)+additional_var}")
356356
del unsymmetrized_mm, unsymmetrized_corresp, \
357357
symmetrization_required, additional_var
@@ -429,7 +429,7 @@ def generate_relaxation(self,
429429
self.n_something_knowable = _counter["Semi"]
430430
self.n_unknowable = _counter["Unknowable"]
431431
if self.verbose > 1:
432-
print(f"The problem has {self.n_knowable} knowable moments, " +
432+
eprint(f"The problem has {self.n_knowable} knowable moments, " +
433433
f"{self.n_something_knowable} semi-knowable moments, " +
434434
f"and {self.n_unknowable} unknowable moments.")
435435

@@ -439,7 +439,7 @@ def generate_relaxation(self,
439439
self.hermitian_moments = [mon for mon in self.moments
440440
if mon.is_hermitian]
441441
if self.verbose > 1:
442-
print(f"The problem has {len(self.hermitian_moments)} " +
442+
eprint(f"The problem has {len(self.hermitian_moments)} " +
443443
"non-negative moments.")
444444

445445
# This dictionary useful for certificates_as_probs
@@ -457,7 +457,7 @@ def generate_relaxation(self,
457457
self.momentmatrix,
458458
self.verbose)
459459
if self.verbose > 1 and len(self.idx_level_equalities):
460-
print("Number of normalization equalities:",
460+
eprint("Number of normalization equalities:",
461461
len(self.idx_level_equalities))
462462
for (norm_idx, summation_idxs) in self.idx_level_equalities:
463463
eq_dict = {self.compmoment_from_idx[norm_idx]: 1}

0 commit comments

Comments
 (0)