4ae93820517945aa7c33fecccc1d32f9c58da722,tensorforce/environments/minimal_test.py,MinimalTest,reset,#MinimalTest#,53

Before Change


        pass

    def reset(self):
        self.state = [(1.0, 0.0) for _ in self.specification]
        if self.single_state_action:
            return self.state[0]
        else:
            return {"state{}".format(n): state for n, state in enumerate(self.state)}

    def execute(self, actions):
        if self.single_state_action:

After Change


    def reset(self):
        self.state = {action_type: (1.0, 0.0) for action_type in self.specification}
        if self.single_state_action:
            return next(iter(self.state.values()))
        else:
            return dict(self.state)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: reinforceio/tensorforce
Commit Name: 4ae93820517945aa7c33fecccc1d32f9c58da722
Time: 2017-12-23
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/environments/minimal_test.py
Class Name: MinimalTest
Method Name: reset


Project Name: allenai/allennlp
Commit Name: c0cb3275d7e2b25e4965763f7f83e7a89ef7c0e4
Time: 2018-01-31
Author: joelgrus@gmail.com
File Name: allennlp/data/iterators/basic_iterator.py
Class Name: BasicIterator
Method Name: _create_batches


Project Name: beancount/smart_importer
Commit Name: 220bbe01ba1ac54adba6bc0e301cb22c7d9b90bb
Time: 2018-05-08
Author: patrick@ch.tario.org
File Name: smart_importer/predict_payees.py
Class Name: PredictPayees
Method Name: enhance_transactions