Skip to content

Commit eda8d9b

Browse files
committed
fix: move warning filter from user facing code
1 parent b9bd779 commit eda8d9b

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

docs/user-guide/amor/amor-reduction.ipynb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@
1818
"## Setup"
1919
]
2020
},
21-
{
22-
"cell_type": "code",
23-
"execution_count": null,
24-
"metadata": {},
25-
"outputs": [],
26-
"source": [
27-
"import warnings\n",
28-
"warnings.filterwarnings('ignore', message=r'Failed to convert .* into a transformation')"
29-
]
30-
},
3121
{
3222
"cell_type": "code",
3323
"execution_count": null,

src/ess/amor/load.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
3+
import warnings
4+
35
import scipp as sc
46

57
from ess.reduce import nexus
@@ -24,6 +26,8 @@
2426
RawChopper,
2527
)
2628

29+
warnings.filterwarnings('ignore', message=r'Failed to convert .* into a transformation')
30+
2731

2832
def load_detector(
2933
file_path: Filename[RunType], detector_name: NeXusDetectorName[RunType]

0 commit comments

Comments
 (0)