remove numpy dependency
This commit is contained in:
parent
8a292d0539
commit
39fe118cb3
2 changed files with 7 additions and 8 deletions
|
|
@ -3,7 +3,6 @@ from functools import reduce, wraps
|
||||||
from math import isfinite
|
from math import isfinite
|
||||||
|
|
||||||
from discrete_signals import signal
|
from discrete_signals import signal
|
||||||
import numpy as np
|
|
||||||
|
|
||||||
from mtl import ast
|
from mtl import ast
|
||||||
from mtl.ast import (And, G, Neg, Next, WeakUntil,
|
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
|
l, u = itvl.lower / dt, itvl.upper / dt
|
||||||
if not (isfinite(l) and isfinite(u)):
|
if not (isfinite(l) and isfinite(u)):
|
||||||
return False
|
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):
|
def _distribute_next(phi, i=0):
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ attrs==18.2.0
|
||||||
codecov==2.0.15
|
codecov==2.0.15
|
||||||
funcy==1.11
|
funcy==1.11
|
||||||
lenses==0.5.0
|
lenses==0.5.0
|
||||||
hypothesis==3.66.30 # pyup: ignore
|
hypothesis==3.66.30
|
||||||
parsimonious==0.8.1
|
parsimonious==0.8.1
|
||||||
pytest==3.2.3 # pyup: ignore
|
pytest==3.2.3
|
||||||
pytest-cov==2.5.1 # pyup: ignore
|
pytest-cov==2.5.1
|
||||||
pytest-flake8==0.9 # pyup: ignore
|
pytest-flake8==0.9
|
||||||
pytest-sugar==0.9.1 # pyup: ignore
|
pytest-sugar==0.9.1
|
||||||
pytest-xdist==1.22.5 # pyup: ignore
|
pytest-xdist==1.22.5
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue