8bd29158f50286a0896a8d239056da0676024551,tpot/built_in_operators.py,ZeroCount,transform,#ZeroCount#Any#Any#,34

Before Change



        X_transformed = np.copy(X)

        non_zero = np.apply_along_axis(
            lambda row: np.count_nonzero(row),
            axis=1,
            arr=X_transformed
        )
        zero_col = np.apply_along_axis(
            lambda row: (n_features - np.count_nonzero(row)),
            axis=1,
            arr=X_transformed

After Change


        X_transformed = np.copy(X)

        non_zero = np.reshape(np.count_nonzero(X_transformed, axis=1), (-1,1))
        zero_col = np.reshape(n_features - np.count_nonzero(X_transformed, axis=1), (-1,1))

        X_transformed = np.hstack((non_zero, X_transformed))
        X_transformed = np.hstack((zero_col, X_transformed))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: EpistasisLab/tpot
Commit Name: 8bd29158f50286a0896a8d239056da0676024551
Time: 2017-05-22
Author: weixuanf@mail.med.upenn.edu
File Name: tpot/built_in_operators.py
Class Name: ZeroCount
Method Name: transform


Project Name: theislab/scanpy
Commit Name: a49923f5f7072986555584884a4fe995b0e52344
Time: 2019-02-17
Author: ivirshup@gmail.com
File Name: scanpy/preprocessing/_qc.py
Class Name:
Method Name: top_segment_proportions_sparse_csr


Project Name: PyMVPA/PyMVPA
Commit Name: a0bb74b7e7e8373016caeba358992ff8116705c0
Time: 2015-03-31
Author: michael.hanke@gmail.com
File Name: mvpa2/algorithms/stelzer_clusterthr.py
Class Name:
Method Name: get_thresholding_map