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)

                
    
        xy  = my_data[1:,:3] // Altitude, Mach, Throttle
        thr = np.transpose(np.atleast_2d(my_data[1:,3])) // Thrust
        sfc = np.transpose(np.atleast_2d(my_data[1:,4]))  // SFC
        

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: 6

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: Kaixhin/Rainbow
Commit Name: fbc23881c651d69da1f7ba92bdab78009d33bf94
Time: 2020-08-20
Author: 32273096+Aladoro@users.noreply.github.com
File Name: memory.py
Class Name:
Method Name:


Project Name: dask/dask-image
Commit Name: f9aea094643fb3240193b0bc0f1908d5b84d82ab
Time: 2018-09-30
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: center_of_mass