logpdf = np.where((cx == 1) | (cx == -np.inf),