Beispiel #1
0
 def __call__(self, value):
     if self.vmax <= self.vmin:
         self.vmax, self.vmin = self.vmin, self.vmax
         result = 1 - Normalize.__call__(self, value)
         self.vmax, self.vmin = self.vmin, self.vmax
     else:
         result = Normalize.__call__(self, value)
     return result
Beispiel #2
0
 def __call__(self, value, clip=None):
     # I'm ignoring masked values and all kinds of edge cases to make a
     # simple example...
     if self.xvalues is not None:
         x, y = self.xvalues, self.cvalues
         return np.ma.masked_array(np.interp(value, x, y))
     else:
         return Normalize.__call__(self, value, clip)
Beispiel #3
0
	def __call__(self, *args):
		v = Normalize.__call__(self, *args)
		return v*v
Beispiel #4
0
 def __call__(self, epoch, **kargs):
     if isinstance(epoch, np.ndarray) and len(epoch.shape) == 0:
         epoch = epoch.item()
     return Normalize.__call__(self, self.mktime(epoch), **kargs)
Beispiel #5
0
 def __call__(self, epoch, **kargs):
     if isinstance(epoch, np.ndarray) and len(epoch.shape) == 0:
         epoch = epoch.item()
     return Normalize.__call__(self, self.mktime(epoch), **kargs)