mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-04 08:18:46 +00:00
Added avg aggregate for vector - closes #51
This commit is contained in:
1 parent
b400ac0f36
commit
e09f93cba7
7 files changed
+272
No files matched your search
@@ -13,3 +13,8 @@ SELECT inner_product('[1,2]', '[3]');
|
||||
SELECT round(cosine_distance('[1,2]', '[2,4]')::numeric, 5);
|
||||
SELECT cosine_distance('[1,2]', '[0,0]');
|
||||
SELECT cosine_distance('[1,2]', '[3]');
|
||||
|
||||
SELECT avg(v) FROM unnest(ARRAY['[1,2,3]'::vector, '[3,5,7]']) v;
|
||||
SELECT avg(v) FROM unnest(ARRAY['[1,2,3]'::vector, '[3,5,7]', NULL]) v;
|
||||
SELECT avg(v) FROM unnest(ARRAY[]::vector[]) v;
|
||||
SELECT avg(v) FROM unnest(ARRAY['[1,2]'::vector, '[3]']) v;
|
||||
Reference in new issue
Block a user