#NEWLINE# def test_nans_and_infs( self ) : #NEWLINE# #INDENT# arr = np . array ( [ np . nan , np . inf , ( - np . inf ) , 0 ] ) #NEWLINE# serialized = self . serialize ( arr ) #NEWLINE# deserialized = self . deserialize ( serialized ) #NEWLINE# assert ( deserialized [ 0 ] == 'NaN' ) #NEWLINE# assert ( deserialized [ 1 ] == 'Infinity' ) #NEWLINE# assert ( self [ 2 ] == '-Infinity' ) #NEWLINE# assert ( deserialized [ 3 ] == 0 )