core.py 文件源码

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

项目:radar 作者: amoose136 项目源码 文件源码
def __setattr__(self, attr, value):
        super(MaskedArray, self).__setattr__(attr, value)
        if attr == 'dtype' and self._mask is not nomask:
            self._mask = self._mask.view(make_mask_descr(value), ndarray)
            # Try to reset the shape of the mask (if we don't have a void)
            # This raises a ValueError if the dtype change won't work
            try:
                self._mask.shape = self.shape
            except (AttributeError, TypeError):
                pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号