io,顾名思义,input/output,输入输出接口;
1. io
Input and output (scipy.io) — SciPy v0.18.1 Reference Guide
wavfile(读写 .wav 文件)
from scipy.io import wavfile wav = wavfile.read('zero.wav') # 返回的 wav 是一个 tuple,三元组;
loadmat/savemat:读写 matlab 数据文件;
import scipy.io train_data = scipy.io.loadmat('train_32x32.mat', variable_names='X').get('X') # scipy.io.loadmat('train_32x32.mat', variable_names='X') 返回得到的是字典(dict)类型 train_labels = scipy.io.loadmat('train_32x32.mat', variable_names='y').get('y')
2. cluster
- hierarchy:显然表示层次聚类;