f37830bbe2c85f613fded1721976dbe94f6bed0b,gym/utils/play.py,,play,#Any#Any#Any#Any#Any#Any#,24

Before Change


    relevant_keys = set(sum(map(list, keys_to_action.keys()),[]))

    if transpose:
        video_size = env.observation_space.shape[1], env.observation_space.shape[0]
    else:
        video_size = env.observation_space.shape[0], env.observation_space.shape[1]

After Change


        If None, default key_to_action mapping for that env is used, if provided.
    
    env.reset()
    rendered=env.render( mode="rgb_array")

    if keys_to_action is None:
        if hasattr(env, "get_keys_to_action"):
            keys_to_action = env.get_keys_to_action()
        elif hasattr(env.unwrapped, "get_keys_to_action"):
            keys_to_action = env.unwrapped.get_keys_to_action()
        else:
            assert False, env.spec.id + " does not have explicit key to action mapping, " + \
                          "please specify one manually"
    relevant_keys = set(sum(map(list, keys_to_action.keys()),[]))
    
    video_size=[rendered.shape[1],rendered.shape[0]]
    if zoom is not None:
        video_size = int(video_size[0] * zoom), int(video_size[1] * zoom)

    pressed_keys = []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: openai/gym
Commit Name: f37830bbe2c85f613fded1721976dbe94f6bed0b
Time: 2019-03-22
Author: martin.delagorce@gmail.com
File Name: gym/utils/play.py
Class Name:
Method Name: play


Project Name: rail-berkeley/softlearning
Commit Name: 6ae604e8c8b0d377d69480dddac7887c4730d0ef
Time: 2018-07-10
Author: kristian.hartikainen@gmail.com
File Name: softlearning/environments/image_pusher.py
Class Name: ImagePusherEnv
Method Name: get_current_obs


Project Name: bokeh/bokeh
Commit Name: 586d3809628db66b2e66e507bda1b9c01d534cfe
Time: 2017-08-25
Author: canavandl@gmail.com
File Name: bokeh/embed.py
Class Name:
Method Name: notebook_div