import numpy as np import pytest @np.vectorize def f(x): if x == 0: return 1 else: return 2 def test_1(): assert list(f([0, 1, 2])) == [1, 2, ...
確定! 回上一頁