Skip to content
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

Fix NumPy warning in test_functions #2746

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _handle_underflow(dtype, *elements):
"xs, ys, connect, expected", [
*(
(
np.arange(6, dtype=dtype), np.arange(0, -6, step=-1, dtype=dtype), 'all',
np.arange(6, dtype=dtype), np.arange(0, -6, step=-1).astype(dtype), 'all',
_handle_underflow(dtype,
(MoveToElement, 0.0, 0.0),
(LineToElement, 1.0, -1.0),
Expand All @@ -300,7 +300,7 @@ def _handle_underflow(dtype, *elements):
),
*(
(
np.arange(6, dtype=dtype), np.arange(0, -6, step=-1, dtype=dtype), 'pairs',
np.arange(6, dtype=dtype), np.arange(0, -6, step=-1).astype(dtype), 'pairs',
_handle_underflow(dtype,
(MoveToElement, 0.0, 0.0),
(LineToElement, 1.0, -1.0),
Expand All @@ -313,7 +313,7 @@ def _handle_underflow(dtype, *elements):
),
*(
(
np.arange(5, dtype=dtype), np.arange(0, -5, step=-1, dtype=dtype), 'pairs',
np.arange(5, dtype=dtype), np.arange(0, -5, step=-1).astype(dtype), 'pairs',
_handle_underflow(dtype,
(MoveToElement, 0.0, 0.0),
(LineToElement, 1.0, -1.0),
Expand Down Expand Up @@ -344,7 +344,7 @@ def _handle_underflow(dtype, *elements):
),
*(
(
np.arange(5, dtype=dtype), np.arange(0, -5, step=-1, dtype=dtype), np.array([0, 1, 0, 1, 0]),
np.arange(5, dtype=dtype), np.arange(0, -5, step=-1).astype(dtype), np.array([0, 1, 0, 1, 0]),
_handle_underflow(dtype,
(MoveToElement, 0.0, 0.0),
(MoveToElement, 1.0, -1.0),
Expand Down