In neutralize() implementation, the denominator of e_biascomponent is the square of the norm of g:
np.square(np.sqrt(np.sum(np.square(g))))
This is based on the original formula. However, this gets different results than the testing answer. The expression should be equal:
np.sum(np.square(g)))
This simplified version passed the test. Why does the two generate different results? For example:
np.square(np.sqrt(8))
= 8
Which basically np.square() cancels out np.sqrt(). But why do the two above get different results?