beca449663b1fc6b3e98f56c9e7875793cef21db,dipy/align/imaffine.py,MattesMIMetric,gradient,#MattesMIMetric#Any#,250

Before Change


        grad : array, shape (n,)
            the gradient of the negative Mutual Information
        
        if self.samples is None:
            self._update_dense(xopt, True)
        else:
            self._update_dense(xopt, True)
        return self.metric_grad * (-1)

    def value_and_gradient(self, xopt):
        r Numeric value of the metric and its gradient at given parameters

After Change


        grad : array, shape (n,)
            the gradient of the negative Mutual Information
        
        self._update(True)
        return -1 * self.metric_grad

    def value_and_gradient(self, params):
        r Numeric value of the metric and its gradient at given parameters
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: nipy/dipy
Commit Name: beca449663b1fc6b3e98f56c9e7875793cef21db
Time: 2015-07-16
Author: jomaroceguedag@gmail.com
File Name: dipy/align/imaffine.py
Class Name: MattesMIMetric
Method Name: gradient


Project Name: nipy/dipy
Commit Name: beca449663b1fc6b3e98f56c9e7875793cef21db
Time: 2015-07-16
Author: jomaroceguedag@gmail.com
File Name: dipy/align/imaffine.py
Class Name: MattesMIMetric
Method Name: distance


Project Name: home-assistant/home-assistant
Commit Name: 191d7b0a50f988716878aa3533c8720d7c61d961
Time: 2017-01-24
Author: stu-gott@users.noreply.github.com
File Name: homeassistant/components/switch/wemo.py
Class Name: WemoSwitch
Method Name: update