1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 jaxtyping,
6 pytestCheckHook,
7 pythonRelaxDepsHook,
8 scipy,
9 setuptools,
10 setuptools-scm,
11 torch,
12 typeguard,
13 wheel,
14}:
15
16buildPythonPackage rec {
17 pname = "linear-operator";
18 version = "0.5.2";
19 format = "pyproject";
20
21 src = fetchFromGitHub {
22 owner = "cornellius-gp";
23 repo = "linear_operator";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-OuE6jx9Q4IU+b2a+mrglRdBOReN1tt/thetNXxwk1GI=";
26 };
27
28 nativeBuildInputs = [
29 pythonRelaxDepsHook
30 setuptools
31 setuptools-scm
32 wheel
33 ];
34
35 propagatedBuildInputs = [
36 jaxtyping
37 scipy
38 torch
39 typeguard
40 ];
41
42 pythonRelaxDeps = [ "typeguard" ];
43
44 pythonImportsCheck = [ "linear_operator" ];
45
46 nativeCheckInputs = [ pytestCheckHook ];
47
48 disabledTests = [
49 # flaky numerical tests
50 "test_matmul_matrix_broadcast"
51 "test_svd"
52 ];
53
54 meta = with lib; {
55 description = "A LinearOperator implementation to wrap the numerical nuts and bolts of GPyTorch";
56 homepage = "https://github.com/cornellius-gp/linear_operator/";
57 license = licenses.mit;
58 maintainers = with maintainers; [ veprbl ];
59 };
60}