1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/tensorly/default.nix
Ben Darwin 32e0d3a3da python312Packages.tensorly: unbreak (incorrect source hash)
The hash observed by r-ryantm corresponds to one commit before the current 0.9.0 tag.
2024-11-20 18:10:37 -05:00

70 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
numpy,
pytestCheckHook,
pythonOlder,
scipy,
setuptools,
}:
buildPythonPackage rec {
pname = "tensorly";
version = "0.9.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-A6Zlp8fa7XFgf4qpg7SEtNLlYSNtDGLuRUEfzD+crQc=";
};
build-system = [ setuptools ];
dependencies = [
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.solvers"
"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/";
changelog = "https://github.com/tensorly/tensorly/releases/tag/${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ bcdarwin ];
};
}