scipy.sparse.dok_matrix. asformat# dok_matrix.asformat(format, copy=False)[source]# 返回此数组/矩阵的指定格式。 参数: format{str, None}期望的稀疏格式(“csr”,“csc”,“lil”,“dok”,“array”,...),如果不需要转换则为 None。 copybool,optional如果为 True,则保证结果不与 self 共享数据。 返回值: A此数组/矩阵的指定格式。