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