zoukankan      html  css  js  c++  java
  • scipy csr_matrix和csc_matrix函数详解

    [链接]:scipy csr_matrix和csc_matrix函数详解_Sundrops的专栏-CSDN博客_csc_matrix

    概述
    在用python进行科学运算时,常常需要把一个稀疏的np.array压缩,这时候就用到scipy库中的sparse.csr_matrix(csr:Compressed Sparse Row marix) 和sparse.csc_matric(csc:Compressed Sparse Column marix)

    scipy.sparse.csr_matrix
    官方API介绍(省略前几种容易理解的了)
    csr_matrix((data, indices, indptr), [shape=(M, N)])
    is the standard CSR representation where the column indices for row i are stored in indices[indptr[i]:indptr[i+1]] and their corresponding values are stored in data[indptr[i]:indptr[i+1]]. If the shape parameter is not supplied, the matrix dimensions are inferred from the index arrays.

    官方API介绍(省略前几种容易理解的了)

    csc_matrix((data, indices, indptr), [shape=(M, N)])
    is the standard CSC representation where the row indices for column i are stored in indices[indptr[i]:indptr[i+1]] and their corresponding values are stored in data[indptr[i]:indptr[i+1]]. If the shape parameter is not supplied, the matrix dimensions are inferred from the index arrays.



  • 相关阅读:
    使用git管理github项目
    router 跳转页面
    JS中[object object]怎么取值
    微信授权获取code
    闭包
    css属性clear
    javaScript循环
    css属性position
    跨域
    浅析JS内存 一
  • 原文地址:https://www.cnblogs.com/huixinquan/p/15233477.html
Copyright © 2011-2022 走看看