Example #1
0
 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))
Example #2
0
 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))
Example #3
0
 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)
Example #4
0
 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)