diff --git a/example/src/if_data_plot.py b/example/src/if_data_plot.py index 2aa1713..a982b53 100644 --- a/example/src/if_data_plot.py +++ b/example/src/if_data_plot.py @@ -15,7 +15,7 @@ file_path = sys.argv[1] else: print(f"Usage: {sys.argv[0]} [file]") - exit() + sys.exit() with open(file_path, "rb") as f: # Read little endian float32 from file diff --git a/src/calculate_bounds.py b/src/calculate_bounds.py index 4d5a1fa..ff4c437 100755 --- a/src/calculate_bounds.py +++ b/src/calculate_bounds.py @@ -44,12 +44,12 @@ def pr(name, type_fp, type_int=None, radix=None, lower=None, upper=None): sign = 1 # Calculate lower and upper limits - if lower == None: + if lower is None: if sign == 1: lower = -math.pow(2, bits - radix - sign) else: lower = 0.0 - if upper == None: + if upper is None: upper = math.pow(2, bits - radix - sign) - math.pow(2, -radix) # String fixing and printout