2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-11-30 08:33:03 +00:00
|
|
|
, buildPythonPackage
|
2023-07-15 17:15:38 +00:00
|
|
|
, dos2unix
|
|
|
|
, fetchpatch
|
2020-11-30 08:33:03 +00:00
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
, pythonOlder
|
2020-11-30 08:33:03 +00:00
|
|
|
, pandas
|
2022-09-09 14:08:57 +00:00
|
|
|
, torch
|
2021-12-06 16:07:01 +00:00
|
|
|
, scipy
|
2020-11-30 08:33:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "slicer";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.0.8";
|
|
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-LnVTr3PwwMLTVfSvzD7Pl8byFW/PRZOVXD9Wz2xNbrc=";
|
2020-11-30 08:33:03 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
prePatch = ''
|
|
|
|
dos2unix slicer/*
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
dos2unix
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook pandas torch scipy ];
|
2020-11-30 08:33:03 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-30 08:33:03 +00:00
|
|
|
description = "Wraps tensor-like objects and provides a uniform slicing interface via __getitem__";
|
|
|
|
homepage = "https://github.com/interpretml/slicer";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ evax ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|