1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, nose
5, numpy
6, scikit-learn
7, scipy
8, numba
9, pynndescent
10, tensorflow
11, pytestCheckHook
12}:
13
14buildPythonPackage rec {
15 pname = "umap-learn";
16 version = "0.5.1";
17
18 src = fetchFromGitHub {
19 owner = "lmcinnes";
20 repo = "umap";
21 rev = version;
22 sha256 = "0favphngcz5jvyqs06x07hk552lvl9qx3vka8r4x0xmv88gsg349";
23 };
24
25 propagatedBuildInputs = [
26 numpy
27 scikit-learn
28 scipy
29 numba
30 pynndescent
31 ];
32
33 checkInputs = [
34 nose
35 tensorflow
36 pytestCheckHook
37 ];
38
39 preCheck = ''
40 export HOME=$TMPDIR
41 '';
42
43 disabledTests = [
44 # Plot functionality requires additional packages.
45 # These test also fail with 'RuntimeError: cannot cache function' error.
46 "test_umap_plot_testability"
47 "test_plot_runs_at_all"
48
49 # Flaky test. Fails with AssertionError sometimes.
50 "test_sparse_hellinger"
51 ];
52
53 meta = with lib; {
54 description = "Uniform Manifold Approximation and Projection";
55 homepage = "https://github.com/lmcinnes/umap";
56 license = licenses.bsd3;
57 maintainers = [ maintainers.costrouc ];
58 };
59}