예제 #1
0
파일: test_rms.py 프로젝트: Error323/tkp
 def test_rmsclippedsubregion(self):
     o = numpy.ones((800, 800))
     sub = statistics.subregion(o)
     clip = statistics.clip(sub)
     rms = statistics.rms(clip)
     self.assertEqual(rms, statistics.rms_with_clipped_subregion(o))
예제 #2
0
파일: test_rms.py 프로젝트: Error323/tkp
 def test_rmsclippedsubregion(self):
     o = numpy.ones((800, 800))
     sub = statistics.subregion(o)
     clip = statistics.clip(sub)
     rms = statistics.rms(clip)
     self.assertEqual(rms, statistics.rms_with_clipped_subregion(o))
예제 #3
0
파일: test_rms.py 프로젝트: Error323/tkp
 def test_clip(self):
     a = numpy.ones([50, 50]) * 10
     a[20, 20] = 20
     clipped = statistics.clip(a)
     check = numpy.array([10] * (50*50-1))
     assert_array_equal(clipped,  check)
예제 #4
0
파일: test_rms.py 프로젝트: Error323/tkp
 def test_clip(self):
     a = numpy.ones([50, 50]) * 10
     a[20, 20] = 20
     clipped = statistics.clip(a)
     check = numpy.array([10] * (50 * 50 - 1))
     assert_array_equal(clipped, check)