e547a82c24b37c157bc9b40d2724a7b1fd0a7b0f,cesium/featurize.py,,save_featureset,#,346
Before Change
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),
features=features, channels=channels, **kwargs)
After Change
arr = v.to_records()
dt_list = arr.dtype.descr
// Change type of indices from object to str
for i, (name, dt) in enumerate(dt_list) :
if dt.endswith("O"):
size = max(len(x) for x in arr["index"])
dt_list[i] = (name, "U" + str(size))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: HazyResearch/fonduer
Commit Name: 0110937ab04f4298f98963bed1de08962d776b24
Time: 2020-07-01
Author: wajdikhattel@think-it.io
File Name: src/fonduer/features/feature_libs/structural_features.py
Class Name:
Method Name: extract_structural_features
Project Name: HazyResearch/fonduer
Commit Name: 5ad9ae2b8ae6b55b07e99de924c77112706aa3b7
Time: 2020-07-01
Author: wajdikhattel@think-it.io
File Name: src/fonduer/features/feature_libs/visual_features.py
Class Name:
Method Name: extract_visual_features