uwot
uwot copied to clipboard
`umap_transform` does not validate input sufficiently
See https://github.com/satijalab/seurat/issues/4647 for an example.
If it is helpful in any way, if prod(dim(X)) < 1
, I can crash the R session consistently.
I think it would be great if an error message pops up in this case instead of a session crash.
# Note: code crashes session. Execute with caution.
library(uwot)
model <- umap(iris, ret_model = TRUE)
trans <- umap_transform(iris[0, ], model = model)
Thank you @teunbrand. The current version on github doesn't cause a session crash with this code, but the error message isn't very good so there is room for improvement here.