e547a82c24b37c157bc9b40d2724a7b1fd0a7b0f,cesium/featurize.py,,save_featureset,#,346

Before Change


        Path to store feature data.
    
    features, channels = zip(*fset.columns)
    for v in [fset.values, features, channels] + list(kwargs.values()):
        if np.array(v).dtype == np.object:
            raise ValueError("Cannot save objects in .npz format.")
    np.savez(path, values=fset.values, index=fset.index.values.astype(str),

After Change


                if dt.endswith("O"):
                    size = max(len(x) for x in arr["index"])
                    dt_list[i] = (name, "U" + str(size))
            kwargs[k] = arr.astype(dt_list)

    // Bypass savez to allow for `allow_pickle` keyword
    // See https://github.com/numpy/numpy/pull/5770
    np.lib.npyio._savez(path, [], kwargs, compress=True, allow_pickle=False)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: cesium-ml/cesium
Commit Name: e547a82c24b37c157bc9b40d2724a7b1fd0a7b0f
Time: 2017-04-17
Author: brettnaul@gmail.com
File Name: cesium/featurize.py
Class Name:
Method Name: save_featureset


Project Name: erikbern/ann-benchmarks
Commit Name: e192e7c8155546ab549773cdaa2de943b0614038
Time: 2018-09-30
Author: maau@itu.dk
File Name: ann_benchmarks/algorithms/bruteforce.py
Class Name: BruteForceBLAS
Method Name: fit


Project Name: tyarkoni/pliers
Commit Name: 005968dcfbd2a8f70d8ea3957c8abba60a12492d
Time: 2018-05-15
Author: quinten.mcnamara@gmail.com
File Name: pliers/filters/video.py
Class Name: FrameSamplingFilter
Method Name: _filter


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: b5034279b48ae96ffdd4714f96e0f62b0f4807fc
Time: 2018-10-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/ordinal.py
Class Name: OrdinalEncoder
Method Name: ordinal_encoding