6c89ec0f602e12acb0efe50d7eb626f781e911bf,nara_wpe/wpe.py,,wpe_v8,#,377

Before Change


    //         iterations=iterations,
    //         neighborhood=neighborhood,
    //     )
    assert Y.ndim == 3, Y.shape

    F = Y.shape[batch_axis]
    index = [slice(None)] * Y.ndim

After Change




def wpe_v8(Y, K=10, delay=3, iterations=3, neighborhood=0):
    if Y.ndim == 2:
        return wpe_v6(
            Y,
            K=K,
            delay=delay,
            iterations=iterations,
            neighborhood=neighborhood,
        )
    elif Y.ndim == 3:
        batch_axis = 0
        F = Y.shape[batch_axis]
        index = [slice(None)] * Y.ndim

        out = []
        for f in range(F):
            index[batch_axis] = f
            out.append(wpe_v6(
                Y=Y[index],
                K=K,
                delay=delay,
                iterations=iterations,
                neighborhood=neighborhood,
            ))
        return np.stack(out, axis=batch_axis)
    else:
        raise NotImplementedError("Input shape is to be (F, D, T) or (D, T).")


wpe = wpe_v7

def abs_square(x: np.ndarray):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: fgnt/nara_wpe
Commit Name: 6c89ec0f602e12acb0efe50d7eb626f781e911bf
Time: 2018-05-24
Author: mail@lukas-drude.de
File Name: nara_wpe/wpe.py
Class Name:
Method Name: wpe_v8


Project Name: geekcomputers/Python
Commit Name: 139259ac8ac83160502cbb896371ce4fa4027361
Time: 2019-10-10
Author: ml.smiley3@gmail.com
File Name: primelib/primelib.py
Class Name:
Method Name: isPrime


Project Name: fgnt/nara_wpe
Commit Name: ab6b42b73b4d8fed909b041966bebe8b025889e2
Time: 2018-05-28
Author: mail@lukas-drude.de
File Name: nara_wpe/wpe.py
Class Name:
Method Name: wpe_v8