2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bokeh,
|
|
|
|
buildPythonPackage,
|
|
|
|
colorcet,
|
|
|
|
datashader,
|
|
|
|
fetchFromGitHub,
|
|
|
|
holoviews,
|
|
|
|
matplotlib,
|
|
|
|
numba,
|
|
|
|
numpy,
|
|
|
|
pandas,
|
|
|
|
pynndescent,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
scikit-image,
|
|
|
|
scikit-learn,
|
|
|
|
scipy,
|
|
|
|
seaborn,
|
|
|
|
tensorflow,
|
|
|
|
tensorflow-probability,
|
|
|
|
tqdm,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "umap-learn";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.5.6";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lmcinnes";
|
|
|
|
repo = "umap";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "refs/tags/release-${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-fqYl8T53BgCqsquY6RJHqpDFsdZA0Ihja69E/kG3YGU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
numba
|
2020-04-24 23:36:52 +00:00
|
|
|
numpy
|
2022-06-16 17:23:12 +00:00
|
|
|
pynndescent
|
2021-05-20 23:08:51 +00:00
|
|
|
scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
scipy
|
2021-12-19 01:06:50 +00:00
|
|
|
tqdm
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
passthru.optional-dependencies = rec {
|
|
|
|
plot = [
|
|
|
|
bokeh
|
|
|
|
colorcet
|
|
|
|
datashader
|
|
|
|
holoviews
|
|
|
|
matplotlib
|
|
|
|
pandas
|
|
|
|
scikit-image
|
|
|
|
seaborn
|
|
|
|
];
|
|
|
|
|
|
|
|
parametric_umap = [
|
|
|
|
tensorflow
|
|
|
|
tensorflow-probability
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
tbb = [ tbb ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
all = plot ++ parametric_umap ++ tbb;
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-05-03 20:48:10 +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_plot_runs_at_all"
|
2024-02-07 01:22:34 +00:00
|
|
|
"test_umap_plot_testability"
|
|
|
|
"test_umap_update_large"
|
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"
|
2022-06-16 17:23:12 +00:00
|
|
|
"test_densmap_trustworthiness_on_iris_supervised"
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
# tensorflow maybe incompatible? https://github.com/lmcinnes/umap/issues/821
|
|
|
|
"test_save_load"
|
2020-10-16 20:44:37 +00:00
|
|
|
];
|
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;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|