scipy.sparse中缺少save_npz方法 [英] save_npz method missing from scipy.sparse

查看:348
本文介绍了scipy.sparse中缺少save_npz方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在python v3.5中的ubuntu 16.04 64位系统上使用scipy库的0.17版本.我找不到 scipy库中的.sparse.save_npz 操作,尽管在最新文档中已提及.

I am using 0.17 version of scipy library on ubuntu 16.04 64-bit system in python v3.5. I am unable to find scipy.sparse.save_npz operation in the library, although it is mentioned in the latest documentation.

在列出scipy.sparse对象中的可调用方法时,我得到以下输出:

On listing the callable methods from scipy.sparse object I am getting the following output:

['SparseEfficiencyWarning',
 'SparseWarning',
 'Tester',
 'bench',
 'block_diag',
 'bmat',
 'bsr_matrix',
 'coo_matrix',
 'cs_graph_components',
 'csc_matrix',
 'csr_matrix',
 'dia_matrix',
 'diags',
 'dok_matrix',
 'eye',
 'find',
 'hstack',
 'identity',
 'issparse',
 'isspmatrix',
 'isspmatrix_bsr',
 'isspmatrix_coo',
 'isspmatrix_csc',
 'isspmatrix_csr',
 'isspmatrix_dia',
 'isspmatrix_dok',
 'isspmatrix_lil',
 'kron',
 'kronsum',
 'lil_matrix',
 'rand',
 'random',
 'spdiags',
 'spmatrix',
 'test',
 'tril',
 'triu',
 'vstack']

该列表应包含save_npz方法,但此方法不存在.如果不建议使用该方法,请告诉我一些保存和加载稀疏矩阵的好方法.

The list should have contained save_npz method but it is not there. If the method has been deprecated then please tell me some good alternatives for saving and loading sparse matrices.

推荐答案

是的,scipy.sparse.save_npz / load_npz是版本0.19.0

Yes, scipy.sparse.save_npz / load_npz are new in version 0.19.0 http://scipy.github.io/devdocs/release.0.19.0.html

这篇关于scipy.sparse中缺少save_npz方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆