From 10378bd00d55f4e25d9b513cf655584ec84f7539 Mon Sep 17 00:00:00 2001 From: Ned Molter Date: Tue, 1 Oct 2024 12:34:48 -0400 Subject: [PATCH] put automodapi in docs, small doc style updates --- docs/stcal/outlier_detection/index.rst | 1 + pyproject.toml | 2 +- src/stcal/outlier_detection/median.py | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/stcal/outlier_detection/index.rst b/docs/stcal/outlier_detection/index.rst index 7c3bac073..a72b7a446 100644 --- a/docs/stcal/outlier_detection/index.rst +++ b/docs/stcal/outlier_detection/index.rst @@ -9,4 +9,5 @@ Outlier Detection Utils description.rst +.. automodapi:: stcal.outlier_detection.median .. automodapi:: stcal.outlier_detection.utils diff --git a/pyproject.toml b/pyproject.toml index fb6f0659b..94c5adf1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,7 +101,7 @@ norecursedirs = [ ] filterwarnings = [ "error::ResourceWarning", - "error:.*finalize.*:pytest.PytestUnraisableExceptionWarning", + "error::pytest.PytestUnraisableExceptionWarning", ] markers = [ "soctests", diff --git a/src/stcal/outlier_detection/median.py b/src/stcal/outlier_detection/median.py index 8ceb06bea..2a408da11 100644 --- a/src/stcal/outlier_detection/median.py +++ b/src/stcal/outlier_detection/median.py @@ -30,13 +30,13 @@ def nanmedian3D(cube: np.ndarray, overwrite_input: bool = True) -> np.ndarray: Parameters ---------- cube - 3-dimensional array. Will be modified in-place if overwrite_input is True + 3-dimensional array. Will be modified in-place if `overwrite_input` is True overwrite_input - Passed to `np.nanmedian`, if True the input cube will be modified + Passed to ``np.nanmedian``, if True the input cube will be modified Returns ------- - median + np.ndarray 2-dimensional computed median array """ with warnings.catch_warnings(): @@ -78,7 +78,7 @@ def __init__(self, buffer_size The buffer size for the median computation, units of bytes. - Has no effect if in_memory is True. + Has no effect if `in_memory` is True. dtype The data type of the input data. @@ -134,7 +134,7 @@ def evaluate(self) -> np.ndarray: Returns ------- - median_data + np.ndarray The median data computed from the input data. """ if self.in_memory: