csr.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:cupy 作者: cupy 项目源码 文件源码
def tocoo(self, copy=False):
        """Converts the matrix to COOdinate format.

        Args:
            copy (bool): If ``False``, it shares data arrays as much as
                possible.

        Returns:
            cupy.sparse.coo_matrix: Converted matrix.

        """
        if copy:
            data = self.data.copy()
            indices = self.indices.copy()
        else:
            data = self.data
            indices = self.indices

        return cusparse.csr2coo(self, data, indices)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号