014963415d1cbc895f8c6f9e7f161950e37dc42e,kymatio/scattering2d/backend/torch_skcuda_backend.py,,_get_dtype,#,20

Before Change


Stream = namedtuple("Stream", ["ptr"])

def _get_dtype(t):
    if isinstance(t, torch.cuda.FloatTensor):
        return "float"
    elif isinstance(t, torch.cuda.DoubleTensor):
        return "double"

def _iscomplex(x):
    return x.shape[-1] == 2

def _isreal(x):

After Change


Stream = namedtuple("Stream", ["ptr"])

def _get_dtype(t):
    dtypes = {torch.float32: "float",
              torch.float64: "double"}

    return dtypes[t.dtype]

def _iscomplex(x):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: kymatio/kymatio
Commit Name: 014963415d1cbc895f8c6f9e7f161950e37dc42e
Time: 2020-02-18
Author: janden@flatironinstitute.org
File Name: kymatio/scattering2d/backend/torch_skcuda_backend.py
Class Name:
Method Name: _get_dtype


Project Name: scikit-optimize/scikit-optimize
Commit Name: 902f36c77c1b8864138be214cb0600bf585f6417
Time: 2017-06-29
Author: iaroslav.email@gmail.com
File Name: skopt/tests/test_searchcv.py
Class Name:
Method Name: test_searchcv_runs


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 3335032e5cbf3776fd48cce2a9e1a597f3b90867
Time: 2019-05-17
Author: joshua.dunn@engie.com
File Name: category_encoders/count.py
Class Name: CountEncoder
Method Name: __init__