Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/pycqa/isort
rev: 8.0.1
rev: 9.0.0a3
hooks:
- id: isort
name: isort
Expand All @@ -55,13 +55,13 @@ repos:
# args:
# - --py37-plus
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.1.0
rev: 26.3.1
hooks:
- id: black
language_version: python3.12
exclude: tests/utils/fast_upper_envelope_org.py
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.4
rev: v0.15.12
hooks:
- id: ruff
# exclude: |
Expand All @@ -70,7 +70,7 @@ repos:
# docs/source/conf.py|
# )$
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.7
rev: v1.7.8
hooks:
- id: docformatter
args:
Expand Down
1 change: 0 additions & 1 deletion src/upper_envelope/math_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ def _find_linear_intersection(
tuple: x and y coordinates of the intersection point.

"""

slope1 = calc_gradient(x1, y1, x2, y2)
slope2 = calc_gradient(x3, y3, x4, y4)

Expand Down
5 changes: 0 additions & 5 deletions src/upper_envelope/numba/fues_numba/fues_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ def fues_numba_unconstrained(
containing refined value function.

"""

endog_grid = endog_grid[np.where(~np.isnan(value))[0]]
policy = policy[np.where(~np.isnan(value))]
value = value[np.where(~np.isnan(value))]
Expand Down Expand Up @@ -234,7 +233,6 @@ def scan_value_function(
the optimal points are kept.

"""

value_refined, policy_refined, endog_grid_refined = _initialize_refined_arrays(
value, policy, endog_grid
)
Expand Down Expand Up @@ -550,7 +548,6 @@ def _forward_scan(
the same value function.

"""

is_next_on_same_value = 0
idx_on_same_value = 0
grad_next_on_same_value = 0
Expand Down Expand Up @@ -623,7 +620,6 @@ def _backward_scan(
previous point on the same value function.

"""

is_before_on_same_value = 0
sub_idx_point_before_on_same_value = 0
grad_before_on_same_value = 0
Expand Down Expand Up @@ -713,7 +709,6 @@ def _linear_intersection(
tuple: x and y coordinates of the intersection point.

"""

slope1 = (y2 - y1) / (x2 - x1)
slope2 = (y4 - y3) / (x4 - x3)

Expand Down
7 changes: 3 additions & 4 deletions tests/test_drued_jorg_numba.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""Tests for `drued_jorg_numba`.

This test mirrors `tests/test_jorg_drued_jax.py` but exercises the numba
implementation.
This test mirrors `tests/test_jorg_drued_jax.py` but exercises the numba implementation.

We compare against `upenv.fues_jax`, but only on evaluation points that lie on
reference line segments that are not affected by explicit intersection handling.
We compare against `upenv.fues_jax`, but only on evaluation points that lie on reference
line segments that are not affected by explicit intersection handling.

"""

Expand Down
1 change: 0 additions & 1 deletion tests/utils/upper_envelope_fedor.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ def _augment_grid(
Shape (2, *n_grid_augmented*).

"""

grid_points_to_add = np.linspace(min_wealth_grid, value[0, 1], n_grid_wealth // 10)[
:-1
]
Expand Down
Loading