83e06cd30a45245c2cb0e9f4bd924224b1581554,rllib/policy/eager_tf_policy.py,,_convert_to_numpy,#Any#,36

Before Change


    if x is None:
        return None
    try:
        return x.numpy()
    except AttributeError:
        raise TypeError(
            ("Object of type {} has no method to convert to numpy.").format(
                type(x)))

After Change


    if x is None:
        return None
    try:
        return tf.nest.map_structure(lambda component: component.numpy(), x)
    except AttributeError:
        raise TypeError(
            ("Object of type {} has no method to convert to numpy.").format(
                type(x)))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ray-project/ray
Commit Name: 83e06cd30a45245c2cb0e9f4bd924224b1581554
Time: 2020-03-01
Author: sven@anyscale.io
File Name: rllib/policy/eager_tf_policy.py
Class Name:
Method Name: _convert_to_numpy


Project Name: ray-project/ray
Commit Name: f08687f5503b1a59b1f5ce9a4cb0d6983d4d1554
Time: 2020-03-08
Author: sven@anyscale.io
File Name: rllib/policy/torch_policy.py
Class Name: TorchPolicy
Method Name: compute_actions


Project Name: AKSHAYUBHAT/DeepVideoAnalytics
Commit Name: 5e82853bb435e7c46e2e3bafa2c1d0a4c40ffb38
Time: 2017-02-03
Author: AKSHAYUBHAT@GMAIL.COM
File Name: dvalib/indexer.py
Class Name: BaseIndexer
Method Name: apply