d65cddeddda46bb20f82b1e233cd5305ace7b1c7,chaospy/descriptives/conditional.py,,E_cond,#Any#Any#Any#,10

Before Change


    if len(freeze.shape) == 1:
        out = _E_cond(poly, freeze, dist, cache, **kws)
    else:
        out = polynomials.concatenate([
            _E_cond(poly, freeze_, dist, cache, **kws)[numpy.newaxis]
            for freeze_ in freeze
        ])
    if out.isconstant():
        out = out.tonumpy()
    return out

After Change


    unfrozen = poly(**{
        ("q%d" % idx): 1 for idx, keep in enumerate(freeze) if keep})
    frozen = poly(**{
        ("q%d" % idx): 1 for idx, keep in enumerate(freeze) if not keep})

    // if no unfrozen, poly will return numpy.ndarray instead of numpoly.ndpoly
    if not isinstance(unfrozen, polynomials.ndpoly):
        return polynomials.sum(frozen, 0)

    // Remove frozen coefficients, such that poly == sum(frozen*unfrozen) holds
    for key in unfrozen.keys:
        unfrozen[key] = unfrozen[key] != 0

    return polynomials.sum(frozen*E(unfrozen, dist), 0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: jonathf/chaospy
Commit Name: d65cddeddda46bb20f82b1e233cd5305ace7b1c7
Time: 2019-12-29
Author: jonathf@gmail.com
File Name: chaospy/descriptives/conditional.py
Class Name:
Method Name: E_cond


Project Name: LCAV/pyroomacoustics
Commit Name: 216fad967ebd8e0df284e2f0e961519321b7a52b
Time: 2019-02-06
Author: ebezzam@gmail.com
File Name: pyroomacoustics/beamforming.py
Class Name: Beamformer
Method Name: process


Project Name: keunwoochoi/kapre
Commit Name: fe8a6175dc98c7bc3b667fe88afcb5c2a4c94169
Time: 2017-01-17
Author: gnuchoi+github@gmail.com
File Name: kapre/stft.py
Class Name: Stft
Method Name: call