db073909d05ae6f91b7abd8d6251bfa247349447,qucumber/utils/cplx.py,,conjugate,#Any#,226

Before Change


        z[0] = x[0]
        z[1] = -x[1]

    if x.dim() == 3:
        z = torch.zeros(2, x.size()[2], x.size()[1], dtype=x.dtype, device=x.device)
        z[0] = torch.transpose(x[0], 0, 1)
        z[1] = -torch.transpose(x[1], 0, 1)

    return z


def elementwise_mult(x, y):

After Change


    :returns: The conjugate of x.
    :rtype: torch.Tensor
    
    if x.dim() < 3:
        return conj(x)
    else:
        return make_complex(
            torch.transpose(real(x), 0, 1), -torch.transpose(imag(x), 0, 1)
        )


def conj(x):
    Returns the element-wise complex conjugate of the argument.

    :param x: A complex tensor.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: PIQuIL/QuCumber
Commit Name: db073909d05ae6f91b7abd8d6251bfa247349447
Time: 2019-12-31
Author: emerali@users.noreply.github.com
File Name: qucumber/utils/cplx.py
Class Name:
Method Name: conjugate


Project Name: tensorly/tensorly
Commit Name: a607a74c5ce96e8a3aaf2d6e0351545fce4febb6
Time: 2021-03-23
Author: jean.kossaifi@gmail.com
File Name: tensorly/tenalg/einsum_tenalg/n_mode_product.py
Class Name:
Method Name: multi_mode_dot


Project Name: LCAV/pyroomacoustics
Commit Name: 2bb7267495ac040af33b9f38bc4c283be37ad19c
Time: 2019-01-22
Author: ebezzam@gmail.com
File Name: pyroomacoustics/utilities.py
Class Name:
Method Name: levinson