From 19fb2c3b2df518091fcb7333e168675fae459fe9 Mon Sep 17 00:00:00 2001 From: Amin Sadeghi Date: Mon, 11 Mar 2024 12:31:46 -0400 Subject: [PATCH] Fix pep8 --- src/porespy/beta/_gdd.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/porespy/beta/_gdd.py b/src/porespy/beta/_gdd.py index 8e6384626..d403feb28 100644 --- a/src/porespy/beta/_gdd.py +++ b/src/porespy/beta/_gdd.py @@ -1,5 +1,5 @@ import time -from porespy import simulations, tools, settings +from porespy import simulations, settings from porespy.tools import Results import numpy as np import openpnm as op @@ -9,7 +9,7 @@ import edt __all__ = ['tortuosity_gdd', 'chunks_to_dataframe'] -settings.loglevel=50 +settings.loglevel = 50 @dask.delayed @@ -199,7 +199,7 @@ def tortuosity_gdd(im, scale_factor=3, use_dask=True): all_gD = [result for result in all_results[::2]] all_tau_unfiltered = [result for result in all_results[1::2]] - all_tau = [result.tortuosity if type(result)!=int + all_tau = [result.tortuosity if not isinstance(result, int) else result for result in all_tau_unfiltered] t4 = time.perf_counter()- t0 @@ -329,9 +329,9 @@ def chunks_to_dataframe(im, scale_factor=3, use_dask=True): all_gD = [result for result in all_results[::2]] all_tau_unfiltered = [result for result in all_results[1::2]] - all_porosity = [result.effective_porosity if type(result)!=int + all_porosity = [result.effective_porosity if not isinstance(result, int) else result for result in all_tau_unfiltered] - all_tau = [result.tortuosity if type(result)!=int + all_tau = [result.tortuosity if not isinstance(result, int) else result for result in all_tau_unfiltered] # creates opnepnm network to calculate image tortuosity