algorithmfoundry / Foundry

The Cognitive Foundry is an open-source Java library for building intelligent systems using machine learning
Other
131 stars 41 forks source link

NaN elements cause vectors to be equal #79

Open jbasilico opened 5 years ago

jbasilico commented 5 years ago

It looks like if you have a NaN element in the code it can cause vectors to be declared equal that are not.

Example code:

        assertFalse(
                VectorFactory.getDenseDefault().copyValues(Double.NaN).equals(
                        VectorFactory.getDenseDefault().copyValues(0.0)));