def test_sample_entropy(): rng = np.random.RandomState(0) symts = rng.randint(10, size=100) sampen = sample_entropy(symts) np.testing.assert_almost_equal(sampen, 2.37954613413)
# -*- coding: utf-8 -*- """ """ import numpy as np # np.set_printoptions(precision=3, linewidth=256) import scipy from scipy import io from dyfunconn.ts import sample_entropy if __name__ == "__main__": rng = np.random.RandomState(0) x = rng.randint(10, size=1000) sampen = sample_entropy(x) print sampen