blob: 94acabe78d2d45e3365f8fae91a716d90e96cbf2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest
, nose
, isPy27
, numpy
, scipy
, sparse
, pytorch
}:
buildPythonPackage rec {
pname = "tensorly";
version = "0.4.5";
disabled = isPy27;
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "1ml91yaxwx4msisxbm92yf22qfrscvk58f3z2r1jhi96pw2k4i7x";
};
propagatedBuildInputs = [ numpy scipy sparse ];
checkInputs = [ pytest nose pytorch ];
# also has a cupy backend, but the tests are currently broken
# (e.g. attempts to access cupy.qr instead of cupy.linalg.qr)
# and this backend also adds a non-optional CUDA dependence,
# as well as tensorflow and mxnet backends, but the tests don't
# seem to exercise these backend by default
checkPhase = ''
runHook preCheck
nosetests -e "test_cupy"
runHook postCheck
'';
meta = with lib; {
description = "Tensor learning in Python";
homepage = "https://tensorly.org/";
license = licenses.bsd3;
maintainers = [ maintainers.bcdarwin ];
};
}
|