예제 #1
0
    def test_summary_valid2(self):
        vals = np.arange(5)

        res = _internal.summarize(features=vals,
                                  callable_sum=summary_memory_error)

        assert res == len(vals)
예제 #2
0
    def test_summary_valid1(self):
        vals = np.arange(5)

        res = _internal.summarize(features=vals,
                                  callable_sum=summary_exception)

        assert res == len(vals)
예제 #3
0
    def test_summary_invalid2(self):
        res = _internal.summarize(
            features=np.arange(5),
            callable_sum=summary_memory_error,
            callable_args={"raise_mem_err": True},
        )

        assert np.isnan(res)
예제 #4
0
    def test_summary_invalid1(self):
        res = _internal.summarize(
            features=np.arange(5),
            callable_sum=summary_exception,
            callable_args={"raise_exception": True},
        )

        assert np.isnan(res)