Example #1
0
 def update_image(self):
     """ update picture """
     if self.ani:
         self.image.set_from_animation(self.pix)
     else:
         test = lib.scale(self.pix.get_width(), self.pix.get_height(), self.dim[0], self.dim[1])
         newpix = self.pix.scale_simple(test[0], test[1], GdkPixbuf.InterpType.BILINEAR)
         self.image.set_from_pixbuf(newpix)
Example #2
0
 def test_scaler_matrix(self):
     d1 = [-10., 0., 50.]
     d2 = [-100., 0., 100.]
     data = [d1, d2]
     output = lib.scale(data)
     assert sum(sum(output)) == 0
Example #3
0
 def test_scaler_vector(self):
     data = [-1., 0., 1]
     output = lib.scale(data)
     assert sum(output) == 0
Example #4
0
 def transform(self, dataset):
     return lib.scale(dataset)
Example #5
0
 def test_scaler_matrix(self):
     d1 = [-10., 0., 50.]
     d2 = [-100., 0., 100.]
     data = [d1, d2]
     output = lib.scale(data)
     assert sum(sum(output)) == 0
Example #6
0
 def test_scaler_vector(self):
     data = [-1., 0., 1]
     output = lib.scale(data)
     assert sum(output) == 0