仅为个人笔记
统计频率:
np.array(np.unique(a, return_counts=True)).T
获取指定轴下最值的索引
numpy.argmax(a, axis=None, out=None): Returns the indices of the maximum values along an axis.
numpy.argmin(a, axis=None, out=None)
函数矢量化
numpy.frompyfunc(func, nin, nout)
numpy.vectorize(pyfunc, otypes=None, doc=None, excluded=None, cache=False, signature=None)
形状相同数据类型不同张量无损合并
numpy.core.records.fromarrays(arrayList, dtype=None, shape=None, formats=None, names=None, titles=None, aligned=False, byteorder=None)[source]
json包裹numpy对象
python对象 = { ‘placeholder’ : ‘placeholder’ , ‘data’ : numpy对象.tolist()}
json对象 = json.dumps(python对象)