#1356 add __iter__ method

Merged
Coverage Reach
plots/backends/matplotlib/forestplot.py plots/backends/matplotlib/ppcplot.py plots/backends/matplotlib/pairplot.py plots/backends/matplotlib/traceplot.py plots/backends/matplotlib/khatplot.py plots/backends/matplotlib/posteriorplot.py plots/backends/matplotlib/elpdplot.py plots/backends/matplotlib/bpvplot.py plots/backends/matplotlib/essplot.py plots/backends/matplotlib/mcseplot.py plots/backends/matplotlib/kdeplot.py plots/backends/matplotlib/loopitplot.py plots/backends/matplotlib/violinplot.py plots/backends/matplotlib/densityplot.py plots/backends/matplotlib/distplot.py plots/backends/matplotlib/__init__.py plots/backends/matplotlib/distcomparisonplot.py plots/backends/matplotlib/jointplot.py plots/backends/matplotlib/energyplot.py plots/backends/matplotlib/rankplot.py plots/backends/matplotlib/separationplot.py plots/backends/matplotlib/compareplot.py plots/backends/matplotlib/autocorrplot.py plots/backends/matplotlib/parallelplot.py plots/backends/matplotlib/hdiplot.py plots/backends/bokeh/forestplot.py plots/backends/bokeh/pairplot.py plots/backends/bokeh/traceplot.py plots/backends/bokeh/kdeplot.py plots/backends/bokeh/ppcplot.py plots/backends/bokeh/posteriorplot.py plots/backends/bokeh/bpvplot.py plots/backends/bokeh/elpdplot.py plots/backends/bokeh/densityplot.py plots/backends/bokeh/__init__.py plots/backends/bokeh/loopitplot.py plots/backends/bokeh/mcseplot.py plots/backends/bokeh/essplot.py plots/backends/bokeh/khatplot.py plots/backends/bokeh/distplot.py plots/backends/bokeh/violinplot.py plots/backends/bokeh/energyplot.py plots/backends/bokeh/rankplot.py plots/backends/bokeh/jointplot.py plots/backends/bokeh/compareplot.py plots/backends/bokeh/separationplot.py plots/backends/bokeh/autocorrplot.py plots/backends/bokeh/parallelplot.py plots/backends/bokeh/hdiplot.py plots/backends/bokeh/distcomparisonplot.py plots/backends/__init__.py plots/plot_utils.py plots/ppcplot.py plots/hdiplot.py plots/densityplot.py plots/essplot.py plots/bpvplot.py plots/pairplot.py plots/loopitplot.py plots/traceplot.py plots/parallelplot.py plots/distcomparisonplot.py plots/elpdplot.py plots/separationplot.py plots/khatplot.py plots/forestplot.py plots/kdeplot.py plots/posteriorplot.py plots/mcseplot.py plots/rankplot.py plots/jointplot.py plots/__init__.py plots/violinplot.py plots/compareplot.py plots/distplot.py plots/autocorrplot.py plots/energyplot.py data/inference_data.py data/io_pystan.py data/io_cmdstan.py data/io_pymc3.py data/io_cmdstanpy.py data/io_pyro.py data/io_numpyro.py data/io_dict.py data/io_emcee.py data/base.py data/io_tfp.py data/io_pyjags.py data/converters.py data/datasets.py data/__init__.py data/io_json.py data/io_netcdf.py stats/stats.py stats/diagnostics.py stats/density_utils.py stats/stats_utils.py stats/stats_refitting.py stats/__init__.py utils.py rcparams.py wrappers/base.py wrappers/wrap_pystan.py wrappers/__init__.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 3 files from the diff.

@@ -185,6 +185,25 @@
Loading
185 185
    def _groups_all(self):
186 186
        return self._groups + self._groups_warmup
187 187
188 +
    def __iter__(self):
189 +
        """Iterate over groups in InferenceData object."""
190 +
        for group in self._groups_all:
191 +
            yield group
192 +
193 +
    def groups(self):
194 +
        """Return all groups present in InferenceData object."""
195 +
        return self._groups_all
196 +
197 +
    def values(self):
198 +
        """Xarray Datasets present in InferenceData object."""
199 +
        for group in self._groups_all:
200 +
            yield getattr(self, group)
201 +
202 +
    def items(self):
203 +
        """Yield groups and corresponding datasets present in InferenceData object."""
204 +
        for group in self._groups_all:
205 +
            yield (group, getattr(self, group))
206 +
188 207
    @staticmethod
189 208
    def from_netcdf(filename):
190 209
        """Initialize object from a netcdf file.

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
arviz 0.01% 91.73%
Project Totals (105 files) 91.73%
Loading