将一段 dask 数组复制到 nparray 时出错,行数不匹配
store = h5py.File(s_file_path + '.hdf5', 'r')
dset = store['data_matrix']
data_matrix = da.from_array(dset, chunks=dset.chunks)
test_set = data_matrix[482:, :]
np_test_set = np.array(test_set, order='FORTRAN')
print "source_set shape: ", data_matrix.shape
print "test_set shape: ", test_set.shape
print "np_test_set shape: ", np_test_set.shape
结果:
source_set shape: (656, 473034)
test set shape: (174, 473034)
np_test_set shape: (195, 473034)
我对 dask 不是很熟悉,我使用它是因为我的数据没有保存在 RAM 中,行差异与缓存或块大小有关吗?