Closed idriskb closed 1 year ago
if (iter > self.agenes_thres) & \ (iter == self.config.MAX_ITER - 1 or \ tf.math.reduce_all(stop_cond) == True or \ min(self.se[self.agenes_thres + 1:]) * 1.1 < self.se[-1] if (iter > self.agenes_thres + 1) else False):
this whole block will return always falseif (iter > self.agenes_thres + 1) is False.
if (iter > self.agenes_thres + 1)
It is either a missing parenthesis
(min(self.se[self.agenes_thres + 1:]) * 1.1 < self.se[-1] if (iter > self.agenes_thres + 1) else False))
meaning that the in-line if is evaluated for the 3rd subcondition.
Otherwise if this was intentional it should be written as:
if (iter > self.agenes_thres+1) & \ (iter == self.config.MAX_ITER - 1 or \ tf.math.reduce_all(stop_cond) == True or \ min(self.se[self.agenes_thres + 1:]) * 1.1 < self.se[-1] ):
with no need to do two ifs
this whole block will return always false
if (iter > self.agenes_thres + 1)
is False.It is either a missing parenthesis
meaning that the in-line if is evaluated for the 3rd subcondition.
Otherwise if this was intentional it should be written as:
with no need to do two ifs