Exemplo n.º 1
0
def eps(X):
    try:
        return np_finfo(dtype(X)).eps
    except:
        return np_finfo(np_float64).eps
Exemplo n.º 2
0
 def safeDecrement(self, map, px, py, value):
     """Decrement a value and make sure it's not negative or something shitty"""
     map[px][py] -= value
     if map[px][py] < np_finfo(float).eps:
         map[px][py] = 0
Exemplo n.º 3
0
def resolution(X):
    try:
        return np_finfo(dtype(X)).resolution
    except:
        return np_finfo(np_float32).resolution