Skip to content

Commit 5d5ccae

Browse files
author
bewygs
committed
add np.array tests for not_equal
1 parent 95c057f commit 5d5ccae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/explainers/test_kernel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ def test_non_numeric():
291291
assert shap.KernelExplainer.not_equal(pd.Timestamp("2017-01-01T12"), pd.Timestamp("2017-01-01T13"))
292292
assert shap.KernelExplainer.not_equal(pd.Period("4Q2005"), pd.Period("3Q2005"))
293293
assert not shap.KernelExplainer.not_equal(pd.Period("4Q2005"), pd.Period("4Q2005"))
294+
assert shap.KernelExplainer.not_equal(np.array([1, 2]), np.array([2, 1]))
295+
assert not shap.KernelExplainer.not_equal(np.array([1, 2]), np.array([1, 2]))
294296

295297

296298
def test_kernel_explainer_with_tensors():

0 commit comments

Comments
 (0)