From 06f55c3a03dde970fa9d291997010df074832633 Mon Sep 17 00:00:00 2001 From: Ryan Awad Date: Sun, 15 Sep 2024 12:48:01 -0400 Subject: [PATCH] Removed experimental package --- go.mod | 1 - go.sum | 2 -- tests/hnswgo_test.go | 7 ++++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 8f923ec..e90e619 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,5 @@ require github.com/stretchr/testify v1.9.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 841ce19..60ce688 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/tests/hnswgo_test.go b/tests/hnswgo_test.go index e66f94c..b72073e 100644 --- a/tests/hnswgo_test.go +++ b/tests/hnswgo_test.go @@ -3,11 +3,10 @@ package tests import ( "fmt" "math" + "sort" "testing" "time" - "golang.org/x/exp/slices" - "github.com/Eigen-DB/hnswgo" "github.com/stretchr/testify/assert" @@ -155,7 +154,9 @@ func TestSearchKNN(t *testing.T) { t.Fatalf("Error when performing similarity search: %s", err.Error()) } - slices.Sort(nnLabels) + sort.Slice(nnLabels, func(i, j int) bool { + return nnLabels[i] < nnLabels[j] + }) assert.Equal(t, []uint32{0, 1, 2, 3, 4}, nnLabels)