bambi/external/patsy.py
Killed 21 out of 25 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 553
--- 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=True, NA_types=["None", "NaN"]):
self.dropna = dropna
if isinstance(NA_types, str):
raise ValueError("NA_types should be a list of strings")
Mutant 554
--- 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 562
--- 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 564
--- 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