def test_effective_sample_size(): x = np.arange(1000.0).reshape(100, 10) assert_allclose(effective_sample_size(x), 52.64, atol=0.01)
def effective_sample_size(samples): if samples.shape[1] < 2: return None # Too few samples. else: return diags.effective_sample_size(samples)