From d90a8e87c49c5f77583d02a0315c09bfda973cf8 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Fri, 21 Feb 2025 18:14:37 -0600 Subject: [PATCH] scripts: Removed clearly unused isinf condition in dat parser --- scripts/plot.py | 3 --- scripts/plotmpl.py | 4 ---- scripts/treemap.py | 3 --- scripts/treemapd3.py | 3 --- 4 files changed, 13 deletions(-) diff --git a/scripts/plot.py b/scripts/plot.py index 246657d3..1c3bf4e9 100755 --- a/scripts/plot.py +++ b/scripts/plot.py @@ -259,9 +259,6 @@ def dat(x): # then try as float try: return float(x) - # just don't allow infinity or nan - if mt.isinf(x) or mt.isnan(x): - raise ValueError("invalid dat %r" % x) except ValueError: pass diff --git a/scripts/plotmpl.py b/scripts/plotmpl.py index 68c01b8b..2b37b16e 100755 --- a/scripts/plotmpl.py +++ b/scripts/plotmpl.py @@ -168,7 +168,6 @@ def openio(path, mode='r', buffering=-1): else: return open(path, mode, buffering) - # parse different data representations def dat(x): # allow the first part of an a/b fraction @@ -184,9 +183,6 @@ def dat(x): # then try as float try: return float(x) - # just don't allow infinity or nan - if mt.isinf(x) or mt.isnan(x): - raise ValueError("invalid dat %r" % x) except ValueError: pass diff --git a/scripts/treemap.py b/scripts/treemap.py index c3b01b61..94a30393 100755 --- a/scripts/treemap.py +++ b/scripts/treemap.py @@ -60,9 +60,6 @@ def dat(x): # then try as float try: return float(x) - # just don't allow infinity or nan - if mt.isinf(x) or mt.isnan(x): - raise ValueError("invalid dat %r" % x) except ValueError: pass diff --git a/scripts/treemapd3.py b/scripts/treemapd3.py index c45df128..11c2b26c 100755 --- a/scripts/treemapd3.py +++ b/scripts/treemapd3.py @@ -76,9 +76,6 @@ def dat(x): # then try as float try: return float(x) - # just don't allow infinity or nan - if mt.isinf(x) or mt.isnan(x): - raise ValueError("invalid dat %r" % x) except ValueError: pass