core.py 文件源码

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

项目:lambda-numba 作者: rlhotovy 项目源码 文件源码
def __itruediv__(self, other):
        """
        True divide self by other in-place.

        """
        other_data = getdata(other)
        dom_mask = _DomainSafeDivide().__call__(self._data, other_data)
        other_mask = getmask(other)
        new_mask = mask_or(other_mask, dom_mask)
        # The following 3 lines control the domain filling
        if dom_mask.any():
            (_, fval) = ufunc_fills[np.true_divide]
            other_data = np.where(dom_mask, fval, other_data)
        self._mask |= new_mask
        self._data.__itruediv__(np.where(self._mask, self.dtype.type(1),
                                         other_data))
        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号