You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/lemaitre/Documents/code/toolbox/scikit-learn/sklearn/impute.py:59: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
return np.equal(X, value_to_mask)
/home/lemaitre/Documents/code/toolbox/scikit-learn/sklearn/impute.py:59: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
return np.equal(X, value_to_mask)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~/miniconda3/envs/dev/lib/python3.6/site-packages/numpy/core/fromnumeric.py in _wrapfunc(obj, method, *args, **kwds)
51 try:
---> 52 return getattr(obj, method)(*args, **kwds)
53
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NotImplementedType'
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
<ipython-input-18-151141bb4b39> in <module>()
----> 1 trans.fit_transform(X)
~/Documents/code/toolbox/scikit-learn/sklearn/base.py in fit_transform(self, X, y, **fit_params)
457 if y is None:
458 # fit method of arity 1 (unsupervised transformation)
--> 459 return self.fit(X, **fit_params).transform(X)
460 else:
461 # fit method of arity 2 (supervised transformation)
~/Documents/code/toolbox/scikit-learn/sklearn/impute.py in transform(self, X)
417 mask = _get_mask(X, self.missing_values)
418 n_missing = np.sum(mask, axis=0)
--> 419 values = np.repeat(valid_statistics, n_missing)
420 coordinates = np.where(mask.transpose())[::-1]
421
~/miniconda3/envs/dev/lib/python3.6/site-packages/numpy/core/fromnumeric.py in repeat(a, repeats, axis)
421
422 """
--> 423 return _wrapfunc(a, 'repeat', repeats, axis=axis)
424
425
~/miniconda3/envs/dev/lib/python3.6/site-packages/numpy/core/fromnumeric.py in _wrapfunc(obj, method, *args, **kwds)
60 # a downstream library like 'pandas'.
61 except (AttributeError, TypeError):
---> 62 return _wrapit(obj, method, *args, **kwds)
63
64
~/miniconda3/envs/dev/lib/python3.6/site-packages/numpy/core/fromnumeric.py in _wrapit(obj, method, *args, **kwds)
40 except AttributeError:
41 wrap = None
---> 42 result = getattr(asarray(obj), method)(*args, **kwds)
43 if wrap:
44 if not isinstance(result, mu.ndarray):
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NotImplementedType'
In short, NotImplement is raised by equal in case of numeric and string mixed dtype. We should put a check in _get_mask which is shared across classes.
The text was updated successfully, but these errors were encountered:
By working on the
MissingIndicator
it seems that there is a missing checking betweenX
andmissing_values
dtype:In short,
NotImplement
is raised by equal in case of numeric and string mixed dtype. We should put a check in_get_mask
which is shared across classes.The text was updated successfully, but these errors were encountered: