bambi/external/patsy.py

Killed 22 out of 25 mutants

Survived

Survived mutation testing. These mutants show holes in your test suite.

Mutant 625

--- bambi/external/patsy.py
+++ bambi/external/patsy.py
@@ -13,7 +13,7 @@
     any) are dropped. See Patsy code/API for NAAction documentation.
     """
 
-    def __init__(self, dropna=False, NA_types=["None", "NaN"]):
+    def __init__(self, dropna=False, NA_types=["XXNoneXX", "NaN"]):
         self.dropna = dropna
         if isinstance(NA_types, str):
             raise ValueError("NA_types should be a list of strings")

Mutant 633

--- bambi/external/patsy.py
+++ bambi/external/patsy.py
@@ -30,7 +30,7 @@
     def is_numerical_NA(self, arr):
         mask = np.zeros(arr.shape, dtype=bool)
         if "NaN" in self.NA_types:
-            mask |= np.isnan(arr)
+            mask = np.isnan(arr)
         if mask.ndim > 1:
             mask = np.any(mask, axis=1)
         return mask

Mutant 635

--- bambi/external/patsy.py
+++ bambi/external/patsy.py
@@ -31,7 +31,7 @@
         mask = np.zeros(arr.shape, dtype=bool)
         if "NaN" in self.NA_types:
             mask |= np.isnan(arr)
-        if mask.ndim > 1:
+        if mask.ndim >= 1:
             mask = np.any(mask, axis=1)
         return mask