Skip to content

Commit

Permalink
remove conditional_jit from plot_forest label_idx (#2319)
Browse files Browse the repository at this point in the history
* remove conditional_jit from plot_forest label_idx

* update changelog

* fix ci
  • Loading branch information
OriolAbril authored Mar 12, 2024
1 parent 82ea6e4 commit 3fc5962
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
python -m pip install wheel
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements-optional.txt
python -m pip install asv!=0.6.2
python -m pip install asv==0.6.1
displayName: 'Install requirements'
- script: |
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

### Maintenance and fixes
- Fix deprecations introduced in latest pandas and xarray versions, and prepare for numpy 2.0 ones ([2315](https://github.com/arviz-devs/arviz/pull/2315)))

- Refactor ECDF code ([2311](https://github.com/arviz-devs/arviz/pull/2311))
- Refactor ECDF code ([2311](https://github.com/arviz-devs/arviz/pull/2311))
- Fix `plot_forest` when Numba is installed ([2319](https://github.com/arviz-devs/arviz/pull/2319))

### Deprecation

Expand Down
3 changes: 1 addition & 2 deletions arviz/data/inference_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ def __len__(self) -> int:

def __iter__(self) -> Iterator[str]:
"""Iterate over groups in InferenceData object."""
for group in self._groups_all:
yield group
yield from self._groups_all

def __contains__(self, key: object) -> bool:
"""Return True if the named item is present, and False otherwise."""
Expand Down
3 changes: 1 addition & 2 deletions arviz/data/io_pystan.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,7 @@ def get_draws(fit, variables=None, ignore=None, warmup=False, dtypes=None):
for item in par_keys:
_, shape = item.replace("]", "").split("[")
shape_idx_min = min(int(shape_value) for shape_value in shape.split(","))
if shape_idx_min < shift:
shift = shape_idx_min
shift = min(shift, shape_idx_min)
# If shift is higher than 1, this will probably mean that Stan
# has implemented sparse structure (saves only non-zero parts),
# but let's hope that dims are still corresponding to the full shape
Expand Down
2 changes: 0 additions & 2 deletions arviz/plots/backends/bokeh/forestplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from ....stats import hdi
from ....stats.density_utils import get_bins, histogram, kde
from ....stats.diagnostics import _ess, _rhat
from ....utils import conditional_jit
from ...plot_utils import _scale_fig_size
from .. import show_layout
from . import backend_kwarg_defaults
Expand Down Expand Up @@ -277,7 +276,6 @@ def labels_and_ticks(self):
"""Collect labels and ticks from plotters."""
val = self.plotters.values()

@conditional_jit(forceobj=True, nopython=False)
def label_idxs():
labels, idxs = [], []
for plotter in val:
Expand Down
2 changes: 0 additions & 2 deletions arviz/plots/backends/matplotlib/forestplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from ....stats.density_utils import get_bins, histogram, kde
from ....stats.diagnostics import _ess, _rhat
from ....sel_utils import xarray_var_iter
from ....utils import conditional_jit
from ...plot_utils import _scale_fig_size
from . import backend_kwarg_defaults, backend_show

Expand Down Expand Up @@ -236,7 +235,6 @@ def labels_and_ticks(self):
"""Collect labels and ticks from plotters."""
val = self.plotters.values()

@conditional_jit(forceobj=True, nopython=False)
def label_idxs():
labels, idxs = [], []
for plotter in val:
Expand Down

0 comments on commit 3fc5962

Please sign in to comment.