def test_entropy_posterior_gets_smaller(self, N=1):
    PRNG = np.random.RandomState(seed=8675309)
    for trial in range(3):
      X = PRNG.randn(N, self.distr.D)
      xxT = np.dot(X.T, X)

      SS = SuffStatBag(K=1, D=self.distr.D)
      SS.setField('N', [N], dims='K')
      SS.setField('xxT', [xxT], dims=('K','D','D'))

      postD = self.distr.get_post_distr(SS, 0)
      assert postD.D == self.distr.D
      Hpost = postD.get_entropy()
      Hprior = self.distr.get_entropy()
      print 'Prior %.3g, Post %.3g' % (Hprior, Hpost)
      print self.distr.invW
      print postD.invW
      assert Hpost < Hprior
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/tests/distr/TestWishartDistr.py/TestWishart.test_entropy_posterior_gets_smaller/original