Skip to content

Commit

Permalink
Merge pull request #355 from jorenham/fasterer-tests
Browse files Browse the repository at this point in the history
faster tests and typing fixes
  • Loading branch information
jorenham authored Nov 21, 2024
2 parents a66cea3 + d5c7a17 commit 231e5c0
Show file tree
Hide file tree
Showing 16 changed files with 156 additions and 227 deletions.
52 changes: 26 additions & 26 deletions lmo/_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def l_moment(
axis: int,
dtype: _DType[np.float64] = np.float64,
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[np.float64]: ...
) -> onp.ArrayND[np.float64]: ...
@overload
def l_moment(
a: onp.ToFloatND,
Expand All @@ -339,7 +339,7 @@ def l_moment(
axis: int,
dtype: _DType[_SCT_f],
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[_SCT_f]: ...
) -> onp.ArrayND[_SCT_f]: ...
def l_moment(
a: onp.ToFloatND,
r: lmt.ToOrder,
Expand Down Expand Up @@ -590,10 +590,10 @@ def l_ratio(
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[np.float64] = np.float64,
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[np.float64]: ...
) -> onp.ArrayND[np.float64]: ...
@overload
def l_ratio(
a: onp.ToFloatND,
Expand All @@ -602,10 +602,10 @@ def l_ratio(
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[_SCT_f],
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[_SCT_f]: ...
) -> onp.ArrayND[_SCT_f]: ...
def l_ratio(
a: onp.ToFloatND,
r: lmt.ToOrder,
Expand Down Expand Up @@ -768,20 +768,20 @@ def l_loc(
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[np.float64] = np.float64,
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[np.float64]: ...
) -> onp.ArrayND[np.float64]: ...
@overload
def l_loc(
a: onp.ToFloatND,
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[_SCT_f],
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[_SCT_f]: ...
) -> onp.ArrayND[_SCT_f]: ...
def l_loc(
a: onp.ToFloatND,
/,
Expand Down Expand Up @@ -892,20 +892,20 @@ def l_scale(
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[np.float64] = np.float64,
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[np.float64]: ...
) -> onp.ArrayND[np.float64]: ...
@overload
def l_scale(
a: onp.ToFloatND,
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[_SCT_f],
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[_SCT_f]: ...
) -> onp.ArrayND[_SCT_f]: ...
def l_scale(
a: onp.ToFloatND,
/,
Expand Down Expand Up @@ -969,20 +969,20 @@ def l_variation(
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[np.float64] = np.float64,
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[np.float64]: ...
) -> onp.ArrayND[np.float64]: ...
@overload
def l_variation(
a: onp.ToFloatND,
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[_SCT_f],
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[_SCT_f]: ...
) -> onp.ArrayND[_SCT_f]: ...
def l_variation(
a: onp.ToFloatND,
/,
Expand Down Expand Up @@ -1053,20 +1053,20 @@ def l_skew(
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[np.float64] = np.float64,
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[np.float64]: ...
) -> onp.ArrayND[np.float64]: ...
@overload
def l_skew(
a: onp.ToFloatND,
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[_SCT_f],
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[_SCT_f]: ...
) -> onp.ArrayND[_SCT_f]: ...
def l_skew(
a: onp.ToFloatND,
/,
Expand Down Expand Up @@ -1128,20 +1128,20 @@ def l_kurtosis(
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[np.float64] = np.float64,
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[np.float64]: ...
) -> onp.ArrayND[np.float64]: ...
@overload
def l_kurtosis(
a: onp.ToFloatND,
/,
trim: lmt.ToTrim = 0,
*,
axis: int | None = None,
axis: int,
dtype: _DType[_SCT_f],
**kwds: Unpack[lmt.LMomentOptions],
) -> _ArrayOrScalar[_SCT_f]: ...
) -> onp.ArrayND[_SCT_f]: ...
def l_kurtosis(
a: onp.ToFloatND,
/,
Expand Down
1 change: 0 additions & 1 deletion lmo/diagnostic.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,6 @@ def l_ratio_bounds(
return t_min.round(12)[()], t_max.round(12)[()]


# TODO: faster doctest
def rejection_point(
influence_fn: Callable[[float], float],
/,
Expand Down
Loading

0 comments on commit 231e5c0

Please sign in to comment.