mparray.py 文件源码

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

项目:mpnum 作者: dseuss 项目源码 文件源码
def compression(self, method='svd', **kwargs):
        """Return a compression of ``self``. Does not modify ``self``.

        Parameters: See :func:`~compress()`.

        :returns: ``(compressed_mpa, overlap)`` where ``overlap`` is the inner
            product returned by :func:`~compress()`.

        """
        if method == 'svd':
            target = self.copy()
            overlap = target._compress_svd(**kwargs)
            return target, overlap
        elif method == 'var':
            return self._compression_var(**kwargs)
        else:
            raise ValueError('{!r} is not a valid method'.format(method))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号