예제 #1
0
    def test_basic(self):
        x, s = self.x, self.s

        assert_equal(x[12:24, 10:20].sum(), sr.sat_sum(s, 12, 10, 23, 19))
        assert_equal(x[:20, :20].sum(), sr.sat_sum(s, 0, 0, 19, 19))
        assert_equal(x[:20, 10:20].sum(), sr.sat_sum(s, 0, 10, 19, 19))
        assert_equal(x[10:20, :20].sum(), sr.sat_sum(s, 10, 0, 19, 19))
예제 #2
0
    def test_basic(self):
        x, s = self.x, self.s

        assert_equal(x[12:24, 10:20].sum(), sr.sat_sum(s, 12, 10, 23, 19))
        assert_equal(x[:20, :20].sum(), sr.sat_sum(s, 0, 0, 19, 19))
        assert_equal(x[:20, 10:20].sum(), sr.sat_sum(s, 0, 10, 19, 19))
        assert_equal(x[10:20, :20].sum(), sr.sat_sum(s, 10, 0, 19, 19))
예제 #3
0
 def test_single(self):
     assert_equal(self.x[0, 0], sr.sat_sum(self.s, 0, 0, 0, 0))
     assert_equal(self.x[10, 10], sr.sat_sum(self.s, 10, 10, 10, 10))
예제 #4
0
 def test_single(self):
     assert_equal(self.x[0, 0], sr.sat_sum(self.s, 0, 0, 0, 0))
     assert_equal(self.x[10, 10], sr.sat_sum(self.s, 10, 10, 10, 10))