File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1919print ("\n Loaded DataFrame:" )
2020print (df_loaded )
2121
22- # Check if numpy arrays were converted to strings
23- if isinstance (df_loaded ["embedding" ][0 ], str ):
24- print ("\n Test Passed: NumPy arrays were converted to strings in CSV" )
25- else :
26- print ("\n Test Failed: NumPy arrays were not converted as expected" )
22+ # ✅ **Make the test fail by checking if we correctly load NumPy arrays**
23+ try :
24+ assert isinstance (df_loaded ["embedding" ][0 ], np .ndarray ), "Test Failed: Embeddings were not preserved as NumPy arrays!"
25+ print ("\n Test Passed: Embeddings were correctly preserved as NumPy arrays" )
26+ except AssertionError as e :
27+ print ("\n Test Failed: Pandas does not preserve NumPy arrays in CSV, needs improvement!" )
28+ raise e
You can’t perform that action at this time.
0 commit comments