@@ -75,9 +75,6 @@ def test_halfvec_binary_format(self):
7575 embedding = HalfVector ([1.5 , 2 , 3 ])
7676 res = conn .execute ('SELECT %b::halfvec' , (embedding ,), binary = True ).fetchone ()[0 ]
7777 assert res == HalfVector ([1.5 , 2 , 3 ])
78- # TODO move
79- assert res .to_list () == [1.5 , 2 , 3 ]
80- assert np .array_equal (res .to_numpy (), np .array ([1.5 , 2 , 3 ]))
8178
8279 def test_halfvec_text_format (self ):
8380 embedding = HalfVector ([1.5 , 2 , 3 ])
@@ -113,12 +110,6 @@ def test_sparsevec_binary_format(self):
113110 embedding = SparseVector ([1.5 , 0 , 2 , 0 , 3 , 0 ])
114111 res = conn .execute ('SELECT %b::sparsevec' , (embedding ,), binary = True ).fetchone ()[0 ]
115112 assert res == embedding
116- # TODO move
117- assert res .dimensions () == 6
118- assert res .indices () == [0 , 2 , 4 ]
119- assert res .values () == [1.5 , 2 , 3 ]
120- assert res .to_list () == [1.5 , 0 , 2 , 0 , 3 , 0 ]
121- assert np .array_equal (res .to_numpy (), np .array ([1.5 , 0 , 2 , 0 , 3 , 0 ]))
122113
123114 def test_sparsevec_text_format (self ):
124115 embedding = SparseVector ([1.5 , 0 , 2 , 0 , 3 , 0 ])
0 commit comments