mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-03 11:10:56 +08:00
Added another test for binary_quantize function [skip ci]
This commit is contained in:
@@ -540,6 +540,12 @@ SELECT binary_quantize('[0,0.1,-0.2,-0.3,0.4,0.5,0.6,-0.7,0.8,-0.9,1]'::halfvec)
|
||||
01001110101
|
||||
(1 row)
|
||||
|
||||
SELECT binary_quantize('[1,2,3,-4,5,6,-7,8,1,-2,-3,4,5,-6,7,8,-1,2,3]'::halfvec);
|
||||
binary_quantize
|
||||
---------------------
|
||||
1110110110011011011
|
||||
(1 row)
|
||||
|
||||
SELECT subvector('[1,2,3,4,5]'::halfvec, 1, 3);
|
||||
subvector
|
||||
-----------
|
||||
|
||||
@@ -576,6 +576,12 @@ SELECT binary_quantize('[0,0.1,-0.2,-0.3,0.4,0.5,0.6,-0.7,0.8,-0.9,1]'::vector);
|
||||
01001110101
|
||||
(1 row)
|
||||
|
||||
SELECT binary_quantize('[1,2,3,-4,5,6,-7,8,1,-2,-3,4,5,-6,7,8,-1,2,3]'::vector);
|
||||
binary_quantize
|
||||
---------------------
|
||||
1110110110011011011
|
||||
(1 row)
|
||||
|
||||
SELECT subvector('[1,2,3,4,5]'::vector, 1, 3);
|
||||
subvector
|
||||
-----------
|
||||
|
||||
Reference in New Issue
Block a user