remove numpy dependency

This commit is contained in:
Marcell Vazquez-Chanlatte 2019-02-11 16:35:57 -08:00
parent 8a292d0539
commit 39fe118cb3
2 changed files with 7 additions and 8 deletions

View file

@ -3,7 +3,6 @@ from functools import reduce, wraps
from math import isfinite
from discrete_signals import signal
import numpy as np
from mtl import ast
from mtl.ast import (And, G, Neg, Next, WeakUntil,
@ -80,7 +79,7 @@ def _interval_discretizable(itvl, dt):
l, u = itvl.lower / dt, itvl.upper / dt
if not (isfinite(l) and isfinite(u)):
return False
return np.isclose(l, round(l)) and np.isclose(u, round(u))
return max(abs(l - round(l)), abs(u - round(u)))
def _distribute_next(phi, i=0):