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