e73418dbc43053ccb522e94e9846de1c88667b73,trunk/SUAVE/Components/Energy/Networks/Propulsor_Surrogate.py,Propulsor_Surrogate,build_surrogate,#Propulsor_Surrogate#,73

Before Change


        // Clean up to remove redundant lines
        // Section 1
        col1 = my_data[1:,:1]
        col2 = my_data[1:,1:2]
        col3 = my_data[1:,2:3]
        for ii in xrange(0, len(col1)-1):
            if (col1[ii] == col1[ii+1])&(col2[ii] == col2[ii+1])&(col3[ii] == col3[ii+1]):
                np.delete(my_data,(ii), axis=0)

After Change


            //if (col1[ii] == col1[ii+1])&(col2[ii] == col2[ii+1])&(col3[ii] == col3[ii+1]):
                //np.delete(my_data,(ii), axis=0)

        b = np.ascontiguousarray(my_data).view(np.dtype((np.void, my_data.dtype.itemsize * my_data.shape[1])))
        _, idx = np.unique(b, return_index=True)
        
        my_data = my_data[idx]                
                
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: suavecode/SUAVE
Commit Name: e73418dbc43053ccb522e94e9846de1c88667b73
Time: 2017-04-01
Author: ebotero@stanford.edu
File Name: trunk/SUAVE/Components/Energy/Networks/Propulsor_Surrogate.py
Class Name: Propulsor_Surrogate
Method Name: build_surrogate


Project Name: SheffieldML/GPy
Commit Name: e1c2eeb25d5c11ad1b55862b9ea4cc5e55ed7516
Time: 2015-04-28
Author: james.hensman@gmail.com
File Name: GPy/kern/_src/stationary.py
Class Name: Stationary
Method Name: _lengthscale_grads_cython


Project Name: brian-team/brian2
Commit Name: 8578aaa850b70522b19c637cdcd796dfbb5d59bc
Time: 2014-06-25
Author: marcel.stimberg@ens.fr
File Name: brian2/groups/spikegeneratorgroup.py
Class Name: SpikeGeneratorGroup
Method Name: __init__