122b5bf2c0c8b6ff7b46adf19c7dd72e62c85b1f,ot/da.py,BaseTransport,inverse_transform,#BaseTransport#Any#Any#Any#Any#,1176

Before Change


        

        // TODO: check whether Xt is new or not
        if self.Xt == Xt:
            // perform standard barycentric mapping
            transp_ = self.gamma_.T / np.sum(self.gamma_, 0)[:, None]

            // set nans to 0
            transp_[~ np.isfinite(transp_)] = 0

            // compute transported samples
            transp_Xt = np.dot(transp_, self.Xs)
        else:
            // perform out of sample mapping
            print("out of sample mapping not yet implemented")

        return transp_Xt

After Change


            The transported target samples.
        

        if np.array_equal(self.Xt, Xt):
            // perform standard barycentric mapping
            transp_ = self.gamma_.T / np.sum(self.gamma_, 0)[:, None]

            // set nans to 0
            transp_[~ np.isfinite(transp_)] = 0

            // compute transported samples
            transp_Xt = np.dot(transp_, self.Xs)
        else:
            // perform out of sample mapping
            print("Warning: out of sample mapping not yet implemented")
            print("input data will be returned")
            transp_Xt = Xt

        return transp_Xt

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: rflamary/POT
Commit Name: 122b5bf2c0c8b6ff7b46adf19c7dd72e62c85b1f
Time: 2017-08-01
Author: stan.chambon@gmail.com
File Name: ot/da.py
Class Name: BaseTransport
Method Name: inverse_transform


Project Name: rflamary/POT
Commit Name: 122b5bf2c0c8b6ff7b46adf19c7dd72e62c85b1f
Time: 2017-08-01
Author: stan.chambon@gmail.com
File Name: ot/da.py
Class Name: BaseTransport
Method Name: transform


Project Name: rflamary/POT
Commit Name: 122b5bf2c0c8b6ff7b46adf19c7dd72e62c85b1f
Time: 2017-08-01
Author: stan.chambon@gmail.com
File Name: ot/da.py
Class Name: BaseTransport
Method Name: inverse_transform


Project Name: rflamary/POT
Commit Name: c7eaaf4caa03d759c4255bdf8b6eebd10ee539a5
Time: 2017-09-01
Author: stan.chambon@gmail.com
File Name: ot/da.py
Class Name: BaseTransport
Method Name: inverse_transform


Project Name: rflamary/POT
Commit Name: c7eaaf4caa03d759c4255bdf8b6eebd10ee539a5
Time: 2017-09-01
Author: stan.chambon@gmail.com
File Name: ot/da.py
Class Name: BaseTransport
Method Name: transform