2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, numpy
|
2022-06-16 17:23:12 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
|
|
|
, sparse
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tensorly";
|
2022-01-07 04:07:37 +00:00
|
|
|
version = "0.7.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-VcX3pCczZQUYZaD7xrrkOcj0QPJt28cYTwpZm5D/X3c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
sparse
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
postPatch = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
# nose is not actually required for anything
|
|
|
|
# (including testing with the minimal dependencies)
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace ", 'nose'" ""
|
2022-01-07 04:07:37 +00:00
|
|
|
'';
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"tensorly"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tensorly"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Partial_SVD took too long, maybe full_matrices set wrongly
|
|
|
|
"test_svd_time"
|
|
|
|
];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Tensor learning in Python";
|
|
|
|
homepage = "https://tensorly.org/";
|
|
|
|
license = licenses.bsd3;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|