e2bc076a6676458ffa7c0b45f17c0290e763808a,arviz/stats/diagnostics.py,,ess,#Any#,119

Before Change


        "identity": _ess_identity,
    }

    methods_relative = {
        "bulk": _ress_bulk,
        "tail": _ress_tail,
        "quantile": _ress_quantile,
        "mean": _ress_mean,
        "sd": _ress_sd,
        "median": _ress_median,
        "mad": _ress_mad,
        "z_scale": _ress_z_scale,
        "folded": _ress_folded,
        "split": _ress_split,
        "identity": _ress_identity,
    }

    if method not in methods:
        raise TypeError(
            "ESS method {} not found. Valid methods are:\n{}".format(method, "\n    ".join(methods))

After Change



    if isinstance(data, np.ndarray):
        data = np.atleast_2d(data)
        if len(data.shape) < 3:
            if prob is not None:
                return ess_func(  // pylint: disable=unexpected-keyword-arg
                    data, prob=prob, relative=relative
                )
            else:
                return ess_func(data, relative=relative)
        else:
            msg = (
                "Only uni-dimensional ndarray variables are supported."
                " Please transform first to dataset with `az.convert_to_dataset`."
            )
            raise TypeError(msg)

    dataset = convert_to_dataset(data, group="posterior")
    var_names = _var_names(var_names, dataset)

    dataset = dataset if var_names is None else dataset[var_names]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: arviz-devs/arviz
Commit Name: e2bc076a6676458ffa7c0b45f17c0290e763808a
Time: 2019-05-13
Author: ahartikainen@users.noreply.github.com
File Name: arviz/stats/diagnostics.py
Class Name:
Method Name: ess


Project Name: descarteslabs/descarteslabs-python
Commit Name: 19fbf408055c0fe0ee45feded3301f4df25be5a0
Time: 2019-12-26
Author: jaap@descarteslabs.com
File Name: descarteslabs/catalog/product.py
Class Name: Product
Method Name: update_related_objects_permissions


Project Name: brian-team/brian2
Commit Name: bc809c7974b172e5fa5f89547034a539fa1c05a1
Time: 2013-08-13
Author: marcel.stimberg@ens.fr
File Name: brian2/groups/group.py
Class Name: GroupItemMapping
Method Name: __getitem__