(self)
| 2855 | assert_equal(np.bitwise_xor(arg1, arg2), out) |
| 2856 | |
| 2857 | def test_reduce(self): |
| 2858 | none = np.array([0, 0, 0, 0], bool) |
| 2859 | some = np.array([1, 0, 1, 1], bool) |
| 2860 | every = np.array([1, 1, 1, 1], bool) |
| 2861 | empty = np.array([], bool) |
| 2862 | |
| 2863 | arrs = [none, some, every, empty] |
| 2864 | |
| 2865 | for arr in arrs: |
| 2866 | assert_equal(np.logical_and.reduce(arr), all(arr)) |
| 2867 | |
| 2868 | for arr in arrs: |
| 2869 | assert_equal(np.logical_or.reduce(arr), any(arr)) |
| 2870 | |
| 2871 | for arr in arrs: |
| 2872 | assert_equal(np.logical_xor.reduce(arr), arr.sum() % 2 == 1) |
| 2873 | |
| 2874 | |
| 2875 | class TestBitwiseUFuncs: |
nothing calls this directly
no test coverage detected