def test_ismember_yes(self, dtype, writable): N = 127 arr = np.arange(N).astype(dtype) values = np.arange(N).astype(dtype) arr.flags.writeable = writable values.flags.writeable = writable result = ht.ismember(arr, values) expected = np.ones_like(values, dtype=np.bool_) tm.assert_numpy_array_equal(result, expected)
def test_ismember_no(self, dtype): arr = np.array([np.nan, np.nan, np.nan], dtype=dtype) values = np.array([1], dtype=dtype) result = ht.ismember(arr, values) expected = np.array([False, False, False], dtype=np.bool_) tm.assert_numpy_array_equal(result, expected)