Description
several rough edges in mixture_smoothing.NP_Mixture_Smoother()
def getStepsize (self , mix_den , ht ): # noqa: N802
##############################################################################
# Something seems off in this function
# - a & b are defined twice
# - 4 defined, but unused, variables (commented out)
##############################################################################
mix_den_fil = np .fabs (mix_den ) > 1.0e-7
a = ht [mix_den_fil ] / mix_den [mix_den_fil ]
b = 1.0 + a
w = self .w
# b_fil = np.fabs(b) > 1.0e-7
# sl = w * ht[b_fil] / b[b_fil]
# s11 = sl.sum()
# s0 = (w * ht).sum()
##############################################################
# NEEDS ATTENTION
# `a` is not defined anywhere... what is it?
# -- seems like the condition is never met
# (bp_seeds[i] - bp_seeds[i - 1] > 1)
bp .append (a [i ]) # noqa: F821
##############################################################
Reactions are currently unavailable
You can’t perform that action at this time.
mixture_smoothing.NP_Mixture_Smoother()esda/esda/mixture_smoothing.py
Lines 182 to 195 in 182d9f4
esda/esda/mixture_smoothing.py
Lines 318 to 324 in 182d9f4