test_BasicThreshold.py 文件源码

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

项目:improver 作者: metoppv 项目源码 文件源码
def test_threshold_boundingzero(self):
        """Test fuzzy threshold of zero."""
        bounds = (-1.0, 1.0)
        plugin = Threshold(0.0, fuzzy_bounds=bounds)
        result = plugin.process(self.cube)
        expected_result_array = np.full_like(
            self.cube.data, fill_value=0.5).reshape(1, 1, 5, 5)
        expected_result_array[0][0][2][2] = 0.75
        self.assertArrayAlmostEqual(result.data, expected_result_array)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号