4ed172063fc1ec493c91b327e4761192dbb227dd,pyemma/_base/serialization/jsonpickler_handlers.py,NumpyNPZHandler,flatten,#NumpyNPZHandler#Any#Any#,50

Before Change


        super(NumpyNPZHandler, self).__init__(context=context)

    def flatten(self, obj, data):
        assert isinstance(obj, np.ndarray)
        buff = BytesIO()
        np.savez_compressed(buff, x=obj)
        buff.seek(0)
        flattened_bytes = util.b64encode(buff.read())

After Change


    def flatten(self, obj, data):
        if obj.dtype == np.object_:
            raise NotImplementedError()
            res = [self.context.flatten(x) for x in obj]

            //raise Exception(str(obj))
            // TODO: how to deal with obj dtype? eg. return list
            //data.clear()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: markovmodel/PyEMMA
Commit Name: 4ed172063fc1ec493c91b327e4761192dbb227dd
Time: 2017-08-31
Author: m.scherer@fu-berlin.de
File Name: pyemma/_base/serialization/jsonpickler_handlers.py
Class Name: NumpyNPZHandler
Method Name: flatten


Project Name: tensorflow/agents
Commit Name: c62215debda5bf5d89723f4112f1e3e2f063cd52
Time: 2020-04-17
Author: kokiopou@google.com
File Name: tf_agents/trajectories/time_step.py
Class Name:
Method Name: termination


Project Name: pymc-devs/pymc3
Commit Name: 782035bbeeb080b5a33d1aeadb6b3f8e77d2ad75
Time: 2017-07-10
Author: maxim.v.kochurov@gmail.com
File Name: pymc3/tests/test_variational_inference.py
Class Name:
Method Name: test_flow_det


Project Name: tensorflow/agents
Commit Name: 49d8d4708eff5db085b8a6d5ee7c08972019a1e0
Time: 2019-08-16
Author: wun@google.com
File Name: tf_agents/agents/dqn/dqn_agent.py
Class Name: DqnAgent
Method Name: _compute_next_q_values