2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-08-22 20:05:09 +00:00
|
|
|
, jaxtyping
|
|
|
|
, pytestCheckHook
|
2024-02-07 01:22:34 +00:00
|
|
|
, pythonRelaxDepsHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, scipy
|
2023-08-22 20:05:09 +00:00
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
2023-05-24 13:37:59 +00:00
|
|
|
, torch
|
2024-02-07 01:22:34 +00:00
|
|
|
, typeguard
|
2023-08-22 20:05:09 +00:00
|
|
|
, 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
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"typeguard"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
pythonImportsCheck = [ "linear_operator" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2023-05-24 13:37:59 +00:00
|
|
|
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; {
|
|
|
|
description = "A LinearOperator implementation to wrap the numerical nuts and bolts of GPyTorch";
|
|
|
|
homepage = "https://github.com/cornellius-gp/linear_operator/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|