Beispiel #1
0
 def clean_delta(self, delta, zeta, i):
     assert (delta.max() + 1 == zeta.shape[0])
     _delta = np.delete(delta, i)
     nj = cu.counter(_delta, _delta.max() + 2)
     fz = cu.first_zero(nj)
     _zeta = zeta[np.where(nj > 0)[0]]
     if (fz == delta[i]) and (fz <= _delta.max()):
         _delta[_delta > fz] = _delta[_delta > fz] - 1
     return _delta, _zeta
Beispiel #2
0
 def clean_delta(self, deltas, mus, Sigmas, i):
     assert (deltas.max() + 1 == mus.shape[0])
     _deltas = np.delete(deltas, i)
     nj = cu.counter(_deltas, _deltas.max() + 2)
     fz = cu.first_zero(nj)
     _mus = mus[np.where(nj > 0)[0]]
     _Sigmas = Sigmas[np.where(nj > 0)[0]]
     if (fz == deltas[i]) and (fz <= _deltas.max()):
         _deltas[_deltas > fz] = _deltas[_deltas > fz] - 1
     return _deltas, _mus, _Sigmas