Beispiel #1
0
 def test_shimbel(self):
     w5 = pysal.lat2W()
     w5_shimbel = pysal.shimbel(w5)
     w5_shimbel024 = 8
     self.assertEquals(w5_shimbel024, w5_shimbel[0][24])
     w5_shimbel004 = [-1, 1, 2, 3]
     self.assertEquals(w5_shimbel004, w5_shimbel[0][0:4])
 def test_shimbel(self):
     w5 = pysal.lat2W()
     w5_shimbel = pysal.shimbel(w5)
     w5_shimbel024 = 8
     self.assertEquals(w5_shimbel024, w5_shimbel[0][24])
     w5_shimbel004 = [-1, 1, 2, 3]
     self.assertEquals(w5_shimbel004, w5_shimbel[0][0:4])
Beispiel #3
0
 def test_shimbel(self):
     d = {0: [-1, 1, 2, 1, 2, 3, 2, 3, 4],
          1: [1, -1, 1, 2, 1, 2, 3, 2, 3],
          2: [2, 1, -1, 3, 2, 1, 4, 3, 2],
          3: [1, 2, 3, -1, 1, 2, 1, 2, 3],
          4: [2, 1, 2, 1, -1, 1, 2, 1, 2],
          5: [3, 2, 1, 2, 1, -1, 3, 2, 1],
          6: [2, 3, 4, 1, 2, 3, -1, 1, 2],
          7: [3, 2, 3, 2, 1, 2, 1, -1, 1],
          8: [4, 3, 2, 3, 2, 1, 2, 1, -1]}
     self.assertEquals(pysal.shimbel(self.w3x3), d)
Beispiel #4
0
 def test_shimbel(self):
     d = {0: [-1, 1, 2, 1, 2, 3, 2, 3, 4],
          1: [1, -1, 1, 2, 1, 2, 3, 2, 3],
          2: [2, 1, -1, 3, 2, 1, 4, 3, 2],
          3: [1, 2, 3, -1, 1, 2, 1, 2, 3],
          4: [2, 1, 2, 1, -1, 1, 2, 1, 2],
          5: [3, 2, 1, 2, 1, -1, 3, 2, 1],
          6: [2, 3, 4, 1, 2, 3, -1, 1, 2],
          7: [3, 2, 3, 2, 1, 2, 1, -1, 1],
          8: [4, 3, 2, 3, 2, 1, 2, 1, -1]}
     self.assertEquals(pysal.shimbel(self.w3x3), d)