gpt4 book ai didi

python - Python 中是否支持稀疏矩阵?

转载 作者:IT老高 更新时间:2023-10-28 20:31:39 26 4
gpt4 key购买 nike

python中是否支持稀疏矩阵?

可能在 numpy 或 scipy 中?

最佳答案

是的。

SciPi 提供 scipy.sparse ,“用于数值数据的二维稀疏矩阵包”。

There are seven available sparse matrix types:

  1. csc_matrix: Compressed Sparse Column format
  2. csr_matrix: Compressed Sparse Row format
  3. bsr_matrix: Block Sparse Row format
  4. lil_matrix: List of Lists format
  5. dok_matrix: Dictionary of Keys format
  6. coo_matrix: COOrdinate format (aka IJV, triplet format)
  7. dia_matrix: DIAgonal format

关于python - Python 中是否支持稀疏矩阵?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4623800/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com