示例#1
0
	def test_var_and_p(self):
		n = sim.pointNormal(0.5,size=10000, loc=0)
		assert np.abs(np.var(n) - 0.5) < 0.05
		assert np.abs(np.sum(n==0) - 5000) < 1000
示例#2
0
	def test_p_zero(self):
		n = sim.pointNormal(0,size=100, loc=1)
		assert np.all(n == np.ones(100))