979c7a3c28bdf3c5565353987e93de55bf8fb632,dipy/reconst/multi_voxel.py,,_squash,#Any#Any#Any#,81

Before Change


        // If items have different shapes just return arr
        if not all_same_shape:
            return arr
        dtype = reduce(np.result_type, not_none)
        result = np.empty(arr.shape + shape, dtype=dtype)
        result.fill(fill)
        for ijk in ndindex(arr.shape):
            if arr[ijk] is not None:

After Change


            return arr
        // Find common dtype.  np.result_type can do this more simply, but it is
        // only available for numpy 1.6.0
        dtypes = set(a.dtype for a in not_none)
        tiny_arrs = [np.zeros((1,), dtype=dt) for dt in dtypes]
        dtype = reduce(np.add, tiny_arrs).dtype
        // Create output array and fill
        result = np.empty(arr.shape + shape, dtype=dtype)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: nipy/dipy
Commit Name: 979c7a3c28bdf3c5565353987e93de55bf8fb632
Time: 2012-12-28
Author: matthew.brett@gmail.com
File Name: dipy/reconst/multi_voxel.py
Class Name:
Method Name: _squash


Project Name: keras-team/keras
Commit Name: 459d7fe3d7aeb065c42249e955a4053270e81814
Time: 2017-03-15
Author: francois.chollet@gmail.com
File Name: examples/babi_rnn.py
Class Name:
Method Name:


Project Name: keras-team/keras
Commit Name: 459d7fe3d7aeb065c42249e955a4053270e81814
Time: 2017-03-15
Author: francois.chollet@gmail.com
File Name: examples/babi_memnn.py
Class Name:
Method Name: