Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre-commit #108

Merged
merged 6 commits into from
May 31, 2024
Merged
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
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ repos:
hooks:
- id: black
language_version: python3.10
exclude: tests/utils/fast_upper_envelope_org.py
# - repo: https://github.com/charliermarsh/ruff-pre-commit
# rev: v0.0.282
# hooks:
Expand All @@ -77,7 +76,6 @@ repos:
- --wrap-descriptions
- '88'
- --blank
exclude: tests/utils/fast_upper_envelope_org.py
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Continuous Integration Workflow](https://github.com/OpenSourceEconomics/dcegm/actions/workflows/main.yml/badge.svg)](https://github.com/OpenSourceEconomics/dcegm/actions/workflows/main.yml)
[![Codecov](https://codecov.io/gh/OpenSourceEconomics/dcegm/branch/main/graph/badge.svg)](https://app.codecov.io/gh/OpenSourceEconomics/dcegm)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/OpenSourceEconomics/dcegm/main.svg)](https://results.pre-commit.ci/latest/github/OpenSourceEconomics/dcegm/main)
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Python implementation of the Discrete-Continuous Endogenous Grid Method (DC-EGM) for
Expand Down
3 changes: 1 addition & 2 deletions src/dcegm/egm/aggregate_marginal_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ def aggregate_marg_utils_and_exp_values(


def calculate_choice_probs_and_unsqueezed_logsum(
choice_values_per_state: jnp.ndarray,
taste_shock_scale: float
choice_values_per_state: jnp.ndarray, taste_shock_scale: float
) -> Tuple[jnp.ndarray, jnp.ndarray, jnp.ndarray]:
max_value_per_state = jnp.nanmax(choice_values_per_state, axis=1, keepdims=True)

Expand Down
2 changes: 1 addition & 1 deletion src/dcegm/pre_processing/state_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def create_indexer_for_space(space):
max_var_values + 1, fill_value=-99999999, dtype=np.int64
)
index_tuple = tuple(space[:, i] for i in range(space.shape[1]))

map_vars_to_index[index_tuple] = np.arange(space.shape[0], dtype=np.int64)

return map_vars_to_index
Expand Down
1 change: 0 additions & 1 deletion src/dcegm/simulation/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import jax.numpy as jnp
import numpy as np
from dcegm.interface import get_state_choice_index_per_state

from dcegm.simulation.sim_utils import compute_final_utility_for_each_choice
from dcegm.simulation.sim_utils import draw_taste_shocks
from dcegm.simulation.sim_utils import interpolate_policy_and_value_for_all_agents
Expand Down
Loading