We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b44af37 commit 7bffeb6Copy full SHA for 7bffeb6
scripts/tests/test_csv.py
@@ -19,8 +19,10 @@
19
print("\nLoaded DataFrame:")
20
print(df_loaded)
21
22
-# Check if numpy arrays were converted to strings
23
-if isinstance(df_loaded["embedding"][0], str):
24
- print("\nTest Passed: NumPy arrays were converted to strings in CSV")
25
-else:
26
- print("\nTest Failed: NumPy arrays were not converted as expected")
+# ✅ **Make the test fail by checking if we correctly load NumPy arrays**
+try:
+ assert isinstance(df_loaded["embedding"][0], np.ndarray), "Test Failed: Embeddings were not preserved as NumPy arrays!"
+ print("\nTest Passed: Embeddings were correctly preserved as NumPy arrays")
+except AssertionError as e:
27
+ print("\nTest Failed: Pandas does not preserve NumPy arrays in CSV, needs improvement!")
28
+ raise e
0 commit comments