I'm inserting nodes with feature vectors into Neo4j using py2neo. It works on almost all of my data. In two cases, though, the vectors contained NaN values, which caused Neo4j to return a 500 error when I tried to create the node.
Example 'good' vector:
[0.0113546584773214, 0.0013764569567850638, 0.0007963202777833693, 0.00024471203511268117, 0.000390211070019412, 0.0028226812771905787, 0.04202329389178023, 0.0016958982585343057, 0.00014684726916060307, 0.000531159187816418, 0.0013412474934636795, 2.1611844247944313e-05, 0.0, 0.0, 0.0, 0.0]
Example 'bad' vector:
[nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, 0.0, 0.0, 0.027777777777777776, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Is there some kind of encoding I need to do so Neo4j will accept them?