From 39fe118cb3317b1d53ff4d6e6e85476965120c70 Mon Sep 17 00:00:00 2001 From: Marcell Vazquez-Chanlatte Date: Mon, 11 Feb 2019 16:35:57 -0800 Subject: [PATCH] remove numpy dependency --- mtl/utils.py | 3 +-- requirements.txt | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mtl/utils.py b/mtl/utils.py index 25e5da0..6604155 100644 --- a/mtl/utils.py +++ b/mtl/utils.py @@ -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): diff --git a/requirements.txt b/requirements.txt index 42cfbcd..50d9bf8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,10 +4,10 @@ attrs==18.2.0 codecov==2.0.15 funcy==1.11 lenses==0.5.0 -hypothesis==3.66.30 # pyup: ignore +hypothesis==3.66.30 parsimonious==0.8.1 -pytest==3.2.3 # pyup: ignore -pytest-cov==2.5.1 # pyup: ignore -pytest-flake8==0.9 # pyup: ignore -pytest-sugar==0.9.1 # pyup: ignore -pytest-xdist==1.22.5 # pyup: ignore +pytest==3.2.3 +pytest-cov==2.5.1 +pytest-flake8==0.9 +pytest-sugar==0.9.1 +pytest-xdist==1.22.5