Hello everyone. Have you ever raised the exception ‘invalid value encountered in power’ while running the Miedema featurizer?

I noticed the variable v_a (in deltaH_elast(…)) can be negative for a few compositions (even passing the precheck), therefore, causing this warning to be raised while calculating alp_a (matminer/featurizers/composition.py, Ln 1223).

I found a way around it substituting the following lines:

alp_a = (np.multiply(1.5, np.power(v_a, 2 / 3)) /

reduce(lambda x, y: 1 / x + 1 / y, np.power(n_ws, 1 / 3)))’

with:

alp_a = (np.multiply(1.5, np.sign(v_a) * (np.abs(v_a)) ** (2 / 3)) /

reduce(lambda x, y: 1 / x + 1 / y, np.power(n_ws, 1 / 3)))

# isolating the absolute value of v_a from its signal to perform the operation

I’m not sure if this was raised before, but I thought it would be good to share with y’all,

Thanks,