jlmelville / rnndescent

R package implementing the Nearest Neighbor Descent method for approximate nearest neighbors
https://jlmelville.github.io/rnndescent/
GNU General Public License v3.0
10 stars 2 forks source link

Unused argument repr= repr #2

Closed vspinu closed 2 years ago

vspinu commented 3 years ago

I am seeing the following error no matter what metric I use:

> X <- matrix(runif(1000), 100, 10)
> graph <- brute_force_knn(X, k = 20, metric = "euclidean")
> nn <- graph_knn_query(X, X, graph, metric = "euclidean")
Error in Matrix::sparseMatrix(i = rep(1:n_row, times = n_nbrs), j = as.vector(idx),  : 
  unused argument (repr = repr)
Backtrace:
    ▆
 1. └─rnndescent::graph_knn_query(X, X, graph, metric = "euclidean")
 2.   └─rnndescent:::graph_to_list(reference_graph)
 3.     └─rnndescent:::graph_to_rsparse(graph)
 4.       └─rnndescent:::graph_to_sparse(graph, "R")
> 
vspinu commented 3 years ago

This comes from older version of Matrix package which is the default on R 4.0.0 which I have. It would be good to add an explicit version dependency for matrix package (>= 1.3-4) or something.

jlmelville commented 3 years ago

Thanks for pointing this out. Looks like repr was added in 1.3.0.

jlmelville commented 3 years ago

This is probably fixed with the obvious change in the DESCRIPTION, but I admit I didn't test it.

jlmelville commented 2 years ago

Please re-open if this isn't actually fixed.