174a27b7fc0266ee31f046262aa455274cfad6d0,gym/spaces/box.py,Box,__init__,#Box#Any#Any#Any#Any#,24

Before Change


        else:
            assert np.isscalar(low) and np.isscalar(high), "box requires scalar bounds. "
            self.shape = tuple(shape)
            self.low = np.full(self.shape, low, dtype=dtype)
            self.high = np.full(self.shape, high, dtype=dtype)

        def _get_precision(dtype):
            if np.issubdtype(dtype, np.floating):
                return np.finfo(dtype).precision

After Change


        if shape is not None:
            shape = tuple(shape)
            assert np.isscalar(low) or low.shape == shape, "low.shape doesn"t match provided shape"
            assert np.isscalar(high) or high.shape == shape, "high.shape doesn"t match provided shape"
        elif not np.isscalar(low):
            shape = low.shape
            assert np.isscalar(high) or high.shape == shape, "high.shape doesn"t match low.shape"
        elif not np.isscalar(high):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: openai/gym
Commit Name: 174a27b7fc0266ee31f046262aa455274cfad6d0
Time: 2020-05-08
Author: zdwiel@gmail.com
File Name: gym/spaces/box.py
Class Name: Box
Method Name: __init__


Project Name: rlworkgroup/garage
Commit Name: d67e08627198355a6d693807e15f8c74dfd23154
Time: 2020-05-15
Author: 44849486+maliesa96@users.noreply.github.com
File Name: tests/garage/tf/q_functions/test_continuous_cnn_q_function.py
Class Name: TestContinuousCNNQFunction
Method Name: test_obs_not_image


Project Name: apache/incubator-tvm
Commit Name: b85c2397356c543b13be4894bf06900a41a13450
Time: 2020-07-16
Author: radioheads@163.com
File Name: tests/python/frontend/tensorflow/test_forward.py
Class Name:
Method Name: _test_lstm_cell


Project Name: openai/gym
Commit Name: 174a27b7fc0266ee31f046262aa455274cfad6d0
Time: 2020-05-08
Author: zdwiel@gmail.com
File Name: gym/spaces/box.py
Class Name: Box
Method Name: __init__