Closed
Description
https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=11349
I think this was just working
=================================== FAILURES ===================================
______________________ TestRangeIndex.test_numpy_argsort _______________________
[gw1] linux -- Python 3.7.3 /home/vsts/miniconda3/envs/pandas-dev/bin/python
self = <pandas.tests.indexes.test_range.TestRangeIndex object at 0x7f157c45ff60>
def test_numpy_argsort(self):
for k, ind in self.indices.items():
> result = np.argsort(ind)
pandas/tests/indexes/common.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../miniconda3/envs/pandas-dev/lib/python3.7/site-packages/numpy/core/overrides.py:150: in public_api
implementation, public_api, relevant_args, args, kwargs)
../../../miniconda3/envs/pandas-dev/lib/python3.7/site-packages/numpy/core/fromnumeric.py:1084: in argsort
return _wrapfunc(a, 'argsort', axis=axis, kind=kind, order=order)
../../../miniconda3/envs/pandas-dev/lib/python3.7/site-packages/numpy/core/fromnumeric.py:61: in _wrapfunc
return bound(*args, **kwds)
pandas/core/indexes/range.py:355: in argsort
nv.validate_argsort(args, kwargs)
pandas/compat/numpy/function.py:56: in __call__
self.defaults)
pandas/util/_validators.py:218: in validate_args_and_kwargs
validate_kwargs(fname, kwargs, compat_args)
pandas/util/_validators.py:157: in validate_kwargs
_check_for_default_values(fname, kwds, compat_args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = 'argsort', arg_val_dict = {'axis': -1, 'kind': None, 'order': None}
compat_args = OrderedDict([('axis', -1), ('kind', 'quicksort'), ('order', None)])
def _check_for_default_values(fname, arg_val_dict, compat_args):
"""
Check that the keys in `arg_val_dict` are mapped to their
default values as specified in `compat_args`.
Note that this function is to be called only when it has been
checked that arg_val_dict.keys() is a subset of compat_args
"""
for key in arg_val_dict:
# try checking equality directly with '=' operator,
# as comparison may have been overridden for the left
# hand object
try:
v1 = arg_val_dict[key]
v2 = compat_args[key]
# check for None-ness otherwise we could end up
# comparing a numpy array vs None
if (v1 is not None and v2 is None) or \
(v1 is None and v2 is not None):
match = False
else:
match = (v1 == v2)
if not is_bool(match):
raise ValueError("'match' is not a boolean")
# could not compare them directly, so try comparison
# using the 'is' operator
except ValueError:
match = (arg_val_dict[key] is compat_args[key])
if not match:
raise ValueError(("the '{arg}' parameter is not "
"supported in the pandas "
"implementation of {fname}()".
> format(fname=fname, arg=key)))
E ValueError: the 'kind' parameter is not supported in the pandas implementation of argsort()
pandas/util/_validators.py:69: ValueError
_________________________ TestIndex.test_numpy_argsort _________________________
[gw0] linux -- Python 3.7.3 /home/vsts/miniconda3/envs/pandas-dev/bin/python
self = <pandas.tests.indexes.test_base.TestIndex object at 0x7f2124480630>
def test_numpy_argsort(self):
for k, ind in self.indices.items():
> result = np.argsort(ind)
pandas/tests/indexes/common.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../miniconda3/envs/pandas-dev/lib/python3.7/site-packages/numpy/core/overrides.py:150: in public_api
implementation, public_api, relevant_args, args, kwargs)
../../../miniconda3/envs/pandas-dev/lib/python3.7/site-packages/numpy/core/fromnumeric.py:1084: in argsort
return _wrapfunc(a, 'argsort', axis=axis, kind=kind, order=order)
../../../miniconda3/envs/pandas-dev/lib/python3.7/site-packages/numpy/core/fromnumeric.py:61: in _wrapfunc
return bound(*args, **kwds)
pandas/core/indexes/range.py:355: in argsort
nv.validate_argsort(args, kwargs)
pandas/compat/numpy/function.py:56: in __call__
self.defaults)
pandas/util/_validators.py:218: in validate_args_and_kwargs
validate_kwargs(fname, kwargs, compat_args)
pandas/util/_validators.py:157: in validate_kwargs
_check_for_default_values(fname, kwds, compat_args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = 'argsort', arg_val_dict = {'axis': -1, 'kind': None, 'order': None}
compat_args = OrderedDict([('axis', -1), ('kind', 'quicksort'), ('order', None)])
def _check_for_default_values(fname, arg_val_dict, compat_args):
"""
Check that the keys in `arg_val_dict` are mapped to their
default values as specified in `compat_args`.
Note that this function is to be called only when it has been
checked that arg_val_dict.keys() is a subset of compat_args
"""
for key in arg_val_dict:
# try checking equality directly with '=' operator,
# as comparison may have been overridden for the left
# hand object
try:
v1 = arg_val_dict[key]
v2 = compat_args[key]
# check for None-ness otherwise we could end up
# comparing a numpy array vs None
if (v1 is not None and v2 is None) or \
(v1 is None and v2 is not None):
match = False
else:
match = (v1 == v2)
if not is_bool(match):
raise ValueError("'match' is not a boolean")
# could not compare them directly, so try comparison
# using the 'is' operator
except ValueError:
match = (arg_val_dict[key] is compat_args[key])
if not match:
raise ValueError(("the '{arg}' parameter is not "
"supported in the pandas "
"implementation of {fname}()".
> format(fname=fname, arg=key)))
E ValueError: the 'kind' parameter is not supported in the pandas implementation of argsort()
pandas/util/_validators.py:69: ValueError