我们从Python开源项目中,提取了以下28个代码示例,用于说明如何使用numpy.False_()。
def test_logical(self): f = np.False_ t = np.True_ s = "xyz" self.assertTrue((t and s) is s) self.assertTrue((f and s) is f)
def test_bitwise_or(self): f = np.False_ t = np.True_ self.assertTrue((t | t) is t) self.assertTrue((f | t) is t) self.assertTrue((t | f) is t) self.assertTrue((f | f) is f)
def test_bitwise_and(self): f = np.False_ t = np.True_ self.assertTrue((t & t) is t) self.assertTrue((f & t) is f) self.assertTrue((t & f) is f) self.assertTrue((f & f) is f)
def test_bitwise_xor(self): f = np.False_ t = np.True_ self.assertTrue((t ^ t) is f) self.assertTrue((f ^ t) is t) self.assertTrue((t ^ f) is t) self.assertTrue((f ^ f) is f)