depot/third_party/nixpkgs/pkgs/development/python-modules/tensorly/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

64 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
numpy,
pytestCheckHook,
pythonOlder,
scipy,
}:
buildPythonPackage rec {
pname = "tensorly";
version = "0.8.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-kYKyLY2V6M53co+26ZTZP4U6bHkFebKI5Uhh1x1/N58=";
};
propagatedBuildInputs = [
numpy
scipy
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [
"tensorly"
"tensorly.base"
"tensorly.cp_tensor"
"tensorly.tucker_tensor"
"tensorly.tt_tensor"
"tensorly.tt_matrix"
"tensorly.parafac2_tensor"
"tensorly.tenalg"
"tensorly.decomposition"
"tensorly.regression"
"tensorly.metrics"
"tensorly.random"
"tensorly.datasets"
"tensorly.plugins"
"tensorly.contrib"
];
pytestFlagsArray = [ "tensorly" ];
disabledTests = [
# this can fail on hydra and other peoples machines, check with others before re-enabling
# AssertionError: Partial_SVD took too long, maybe full_matrices set wrongly
"test_svd_time"
];
meta = with lib; {
description = "Tensor learning in Python";
homepage = "https://tensorly.org/";
license = licenses.bsd3;
maintainers = with maintainers; [ bcdarwin ];
};
}