2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nose
|
|
|
|
, numpy
|
|
|
|
, scikitlearn
|
|
|
|
, scipy
|
|
|
|
, numba
|
2021-02-05 17:12:51 +00:00
|
|
|
, pynndescent
|
|
|
|
, tensorflow
|
2020-10-16 20:44:37 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "umap-learn";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "0.5.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lmcinnes";
|
|
|
|
repo = "umap";
|
|
|
|
rev = version;
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "sha256-2Z5RDi4bz8hh8zMwkcCQY9NrGaVd1DJEBOmrCl2oSvM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
nose
|
2021-02-05 17:12:51 +00:00
|
|
|
tensorflow
|
2020-10-16 20:44:37 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scikitlearn
|
|
|
|
scipy
|
|
|
|
numba
|
2021-02-05 17:12:51 +00:00
|
|
|
pynndescent
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Plot functionality requires additional packages.
|
|
|
|
# These test also fail with 'RuntimeError: cannot cache function' error.
|
|
|
|
"test_umap_plot_testability"
|
|
|
|
"test_plot_runs_at_all"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
# Flaky test. Fails with AssertionError sometimes.
|
|
|
|
"test_sparse_hellinger"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Uniform Manifold Approximation and Projection";
|
|
|
|
homepage = "https://github.com/lmcinnes/umap";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|