Skip to content

Commit f3f5201

Browse files
committed
[logger] minor polish and fix issue #337
1 parent b0d6b47 commit f3f5201

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cma/logger.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,12 +1622,12 @@ def plot_divers(self, iabscissa=0, foffset=1e-19, fshift=0, message=None):
16221622
# standard deviations std
16231623
_x_std = _monotone_abscissa(dat.std[:, iabscissa])
16241624
semilogy(_x_std[:-1],
1625-
np.vstack([list(map(max, dat.std[:-1, 5:])),
1626-
list(map(min, dat.std[:-1, 5:]))]).T,
1625+
np.vstack([list(map(np.max, dat.std[:-1, 5:])),
1626+
list(map(np.min, dat.std[:-1, 5:]))]).T,
16271627
'-m', linewidth=2)
1628-
text(_x_std[-2], max(dat.std[-2, 5:]), 'max std',
1628+
text(_x_std[-2], np.max(dat.std[-2, 5:]), 'max std',
16291629
fontsize=fontsize)
1630-
text(_x_std[-2], min(dat.std[-2, 5:]), 'min std',
1630+
text(_x_std[-2], np.min(dat.std[-2, 5:]), 'min std',
16311631
fontsize=fontsize)
16321632

16331633
# AR and sigma
@@ -1668,7 +1668,7 @@ def plot_divers(self, iabscissa=0, foffset=1e-19, fshift=0, message=None):
16681668
def c_odds(c):
16691669
cc = (c + 1) / (c - 1)
16701670
cc[cc < 0] = -1 / cc[cc < 0]
1671-
return cc
1671+
return cc if len(cc) > 1 else cc[0]
16721672
_x = _monotone_abscissa(dat.corrspec[:, iabscissa], iabscissa)
16731673
semilogy(_x, c_odds(dat.corrspec[:, 2]), # smallest = largest negative correlation
16741674
corr_in_plot_divers_color, label=r'$\min (c + 1) / (c - 1)$')

0 commit comments

Comments
 (0)