-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.4.0rc4 #449
1.4.0rc4 #449
Conversation
You neither build nor test with numpy 2.0.0rc1 in your tests though: https://github.com/pydata/bottleneck/actions/runs/8952001350/job/24588934895#step:4:21 This is what happens if you run the tests with 1.4.0rc4 and numpy 2.0.0rc1: [ 40s] =================================== FAILURES ===================================
[ 40s] __________________________ test_list_input[move_sum] ___________________________
[ 40s]
[ 40s] func = <built-in function move_sum>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_sum>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:23: in move_sum
[ 40s] return move_func(np.nansum, a, window, min_count, axis=axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function nansum at 0x7f9c84b06470>, a = [0.0, 1.0, 2.0, 3.0], window = 2
[ 40s] min_count = None, axis = -1, kwargs = {}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] __________________________ test_list_input[move_mean] __________________________
[ 40s]
[ 40s] func = <built-in function move_mean>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_mean>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:28: in move_mean
[ 40s] return move_func(np.nanmean, a, window, min_count, axis=axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function nanmean at 0x7f9c84b06930>, a = [0.0, 1.0, 2.0, 3.0]
[ 40s] window = 2, min_count = None, axis = -1, kwargs = {}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] __________________________ test_list_input[move_std] ___________________________
[ 40s]
[ 40s] func = <built-in function move_std>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_std>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:33: in move_std
[ 40s] return move_func(np.nanstd, a, window, min_count, axis=axis, ddof=ddof)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function nanstd at 0x7f9c84b07170>, a = [0.0, 1.0, 2.0, 3.0], window = 2
[ 40s] min_count = None, axis = -1, kwargs = {'ddof': 0}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] __________________________ test_list_input[move_var] ___________________________
[ 40s]
[ 40s] func = <built-in function move_var>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_var>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:38: in move_var
[ 40s] return move_func(np.nanvar, a, window, min_count, axis=axis, ddof=ddof)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function nanvar at 0x7f9c84b06f70>, a = [0.0, 1.0, 2.0, 3.0], window = 2
[ 40s] min_count = None, axis = -1, kwargs = {'ddof': 0}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] __________________________ test_list_input[move_min] ___________________________
[ 40s]
[ 40s] func = <built-in function move_min>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_min>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:43: in move_min
[ 40s] return move_func(np.nanmin, a, window, min_count, axis=axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function nanmin at 0x7f9c84b05df0>, a = [0.0, 1.0, 2.0, 3.0], window = 2
[ 40s] min_count = None, axis = -1, kwargs = {}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] __________________________ test_list_input[move_max] ___________________________
[ 40s]
[ 40s] func = <built-in function move_max>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_max>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:48: in move_max
[ 40s] return move_func(np.nanmax, a, window, min_count, axis=axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function nanmax at 0x7f9c84b05ff0>, a = [0.0, 1.0, 2.0, 3.0], window = 2
[ 40s] min_count = None, axis = -1, kwargs = {}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] _________________________ test_list_input[move_argmin] _________________________
[ 40s]
[ 40s] func = <built-in function move_argmin>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_argmin>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:74: in move_argmin
[ 40s] return move_func(argmin, a, window, min_count, axis=axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function move_argmin.<locals>.argmin at 0x7f9c84a9d2d0>
[ 40s] a = [0.0, 1.0, 2.0, 3.0], window = 2, min_count = None, axis = -1, kwargs = {}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] _________________________ test_list_input[move_argmax] _________________________
[ 40s]
[ 40s] func = <built-in function move_argmax>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_argmax>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:100: in move_argmax
[ 40s] return move_func(argmax, a, window, min_count, axis=axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function move_argmax.<locals>.argmax at 0x7f9c871ba830>
[ 40s] a = [0.0, 1.0, 2.0, 3.0], window = 2, min_count = None, axis = -1, kwargs = {}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] _________________________ test_list_input[move_median] _________________________
[ 40s]
[ 40s] func = <built-in function move_median>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_median>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:105: in move_median
[ 40s] return move_func(np.nanmedian, a, window, min_count, axis=axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function nanmedian at 0x7f9c84b06af0>, a = [0.0, 1.0, 2.0, 3.0]
[ 40s] window = 2, min_count = None, axis = -1, kwargs = {}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] __________________________ test_list_input[move_rank] __________________________
[ 40s]
[ 40s] func = <built-in function move_rank>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] > actual = func(a)
[ 40s] E TypeError: wrong number of arguments
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:42: TypeError
[ 40s]
[ 40s] During handling of the above exception, another exception occurred:
[ 40s]
[ 40s] func = <built-in function move_rank>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] desired = func0(a)
[ 40s] except TypeError:
[ 40s] actual = func(a, 2)
[ 40s] > desired = func0(a, 2)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:46:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:110: in move_rank
[ 40s] return move_func(lastrank, a, window, min_count, axis=axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func = <function lastrank at 0x7f9c84b3e7a0>, a = [0.0, 1.0, 2.0, 3.0]
[ 40s] window = 2, min_count = None, axis = -1, kwargs = {}
[ 40s]
[ 40s] def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
[ 40s] "Generic moving window function implemented with a python loop."
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/move.py:118: ValueError
[ 40s] __________________________ test_list_input[rankdata] ___________________________
[ 40s]
[ 40s] func = <built-in function rankdata>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] > desired = func0(a)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:43:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/nonreduce_axis.py:9: in rankdata
[ 40s] return _rank(scipy_rankdata, a, axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func1d = <function scipy_rankdata at 0x7f9c84b3e050>, a = [0.0, 1.0, 2.0, 3.0]
[ 40s] axis = None
[ 40s]
[ 40s] def _rank(func1d, a, axis):
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/nonreduce_axis.py:18: ValueError
[ 40s] _________________________ test_list_input[nanrankdata] _________________________
[ 40s]
[ 40s] func = <built-in function nanrankdata>
[ 40s]
[ 40s] @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__)
[ 40s] def test_list_input(func):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for list input."""
[ 40s] msg = "\nfunc %s | input %s (%s) | shape %s\n"
[ 40s] msg += "\nInput array:\n%s\n"
[ 40s] name = func.__name__
[ 40s] if name == "replace":
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % name)
[ 40s] for i, a in enumerate(lists()):
[ 40s] with warnings.catch_warnings():
[ 40s] warnings.simplefilter("ignore")
[ 40s] try:
[ 40s] actual = func(a)
[ 40s] > desired = func0(a)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/list_input_test.py:43:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/nonreduce_axis.py:14: in nanrankdata
[ 40s] return _rank(_nanrankdata_1d, a, axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func1d = <function _nanrankdata_1d at 0x7f9c84b3df30>, a = [0.0, 1.0, 2.0, 3.0]
[ 40s] axis = None
[ 40s]
[ 40s] def _rank(func1d, a, axis):
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/nonreduce_axis.py:18: ValueError
[ 40s] _________________________ test_scalar_input[rankdata] __________________________
[ 40s]
[ 40s] func = <built-in function rankdata>, args = ()
[ 40s]
[ 40s] @pytest.mark.parametrize(
[ 40s] "func",
[ 40s] bn.get_functions("reduce") + bn.get_functions("nonreduce_axis"), # noqa: W504
[ 40s] ids=lambda x: x.__name__,
[ 40s] )
[ 40s] def test_scalar_input(func, args=tuple()):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for scalar input."""
[ 40s] if func.__name__ in ("partition", "argpartition", "push"):
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % func.__name__)
[ 40s] msg = "\nfunc %s | input %s\n"
[ 40s] a = -9
[ 40s] argsi = [a] + list(args)
[ 40s] actual = func(*argsi)
[ 40s] > desired = func0(*argsi)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/scalar_input_test.py:22:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/nonreduce_axis.py:9: in rankdata
[ 40s] return _rank(scipy_rankdata, a, axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func1d = <function scipy_rankdata at 0x7f9c84b3e050>, a = -9, axis = None
[ 40s]
[ 40s] def _rank(func1d, a, axis):
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/nonreduce_axis.py:18: ValueError
[ 40s] ________________________ test_scalar_input[nanrankdata] ________________________
[ 40s]
[ 40s] func = <built-in function nanrankdata>, args = ()
[ 40s]
[ 40s] @pytest.mark.parametrize(
[ 40s] "func",
[ 40s] bn.get_functions("reduce") + bn.get_functions("nonreduce_axis"), # noqa: W504
[ 40s] ids=lambda x: x.__name__,
[ 40s] )
[ 40s] def test_scalar_input(func, args=tuple()):
[ 40s] """Test that bn.xxx gives the same output as bn.slow.xxx for scalar input."""
[ 40s] if func.__name__ in ("partition", "argpartition", "push"):
[ 40s] return
[ 40s] func0 = eval("bn.slow.%s" % func.__name__)
[ 40s] msg = "\nfunc %s | input %s\n"
[ 40s] a = -9
[ 40s] argsi = [a] + list(args)
[ 40s] actual = func(*argsi)
[ 40s] > desired = func0(*argsi)
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/tests/scalar_input_test.py:22:
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/nonreduce_axis.py:14: in nanrankdata
[ 40s] return _rank(_nanrankdata_1d, a, axis)
[ 40s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 40s]
[ 40s] func1d = <function _nanrankdata_1d at 0x7f9c84b3df30>, a = -9, axis = None
[ 40s]
[ 40s] def _rank(func1d, a, axis):
[ 40s] > a = np.array(a, copy=False)
[ 40s] E ValueError: Unable to avoid copy while creating an array as requested.
[ 40s] E If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
[ 40s] E For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.
[ 40s]
[ 40s] ../../BUILDROOT/python-Bottleneck-1.4.0~rc4-25.1.x86_64/usr/lib64/python3.10/site-packages/bottleneck/slow/nonreduce_axis.py:18: ValueError
[ 40s] =========================== short test summary info ============================
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_sum] - ValueError: Unab...
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_mean] - ValueError: Una...
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_std] - ValueError: Unab...
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_var] - ValueError: Unab...
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_min] - ValueError: Unab...
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_max] - ValueError: Unab...
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_argmin] - ValueError: U...
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_argmax] - ValueError: U...
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_median] - ValueError: U...
[ 40s] FAILED tests/list_input_test.py::test_list_input[move_rank] - ValueError: Una...
[ 40s] FAILED tests/list_input_test.py::test_list_input[rankdata] - ValueError: Unab...
[ 40s] FAILED tests/list_input_test.py::test_list_input[nanrankdata] - ValueError: U...
[ 40s] FAILED tests/scalar_input_test.py::test_scalar_input[rankdata] - ValueError: ...
[ 40s] FAILED tests/scalar_input_test.py::test_scalar_input[nanrankdata] - ValueErro...
[ 40s] ================ 14 failed, 165 passed, 13 deselected in 6.25s ================= |
Yes it is building with Numpy 2.0rc1 but the test failures above are due to a change in API in Numpy 2.0 at runtime specifically the meaning of copy. |
In Numpy 2.0, you should use |
Care to push a PR which fixes the API change (and maybe edits the tests correctly?) |
No description provided.