2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
jaxtyping,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
scipy,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
torch,
|
|
|
|
typeguard,
|
|
|
|
wheel,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-01-13 08:15:51 +00:00
|
|
|
pname = "linear-operator";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.5.2";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cornellius-gp";
|
2024-01-13 08:15:51 +00:00
|
|
|
repo = "linear_operator";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-OuE6jx9Q4IU+b2a+mrglRdBOReN1tt/thetNXxwk1GI=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeBuildInputs = [
|
2024-02-07 01:22:34 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-08-22 20:05:09 +00:00
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
wheel
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
jaxtyping
|
2023-05-24 13:37:59 +00:00
|
|
|
scipy
|
|
|
|
torch
|
2024-02-07 01:22:34 +00:00
|
|
|
typeguard
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "typeguard" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
pythonImportsCheck = [ "linear_operator" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# flaky numerical tests
|
2024-02-07 01:22:34 +00:00
|
|
|
"test_matmul_matrix_broadcast"
|
2023-05-24 13:37:59 +00:00
|
|
|
"test_svd"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "LinearOperator implementation to wrap the numerical nuts and bolts of GPyTorch";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://github.com/cornellius-gp/linear_operator/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|