Skip to content

Commit

Permalink
fix cache=True if r is larger than what's cached
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham committed Jul 3, 2023
1 parent 0113cf7 commit f150b4a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions lmo/_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,10 @@ def l_weights(
if P_r.shape[0] < r:
P_r = P_r[:r]

assert P_r.shape == (r, n)
return cast(npt.NDArray[T], P_r)
# ignore if r is larger that what's cached
if P_r.shape[0] == r:
assert P_r.shape == (r, n)
return cast(npt.NDArray[T], P_r)


if sum(trim) == 0:
Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "lmo"
version = "0.6.0"
version = "0.6.1"
description = "L-Moments for robust statistics."
authors = ["Joren Hammudoglu <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit f150b4a

Please sign in to comment.