8000 Add a link to the migration guide for the deprecation warning · numpy/numpy@1d8a211 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d8a211

Browse files
authored
Add a link to the migration guide for the deprecation warning
1 parent 290e3a0 commit 1d8a211

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

numpy/_core/src/multiarray/ctors.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,9 @@ check_or_clear_and_warn_error_if_due_to_copy_kwarg(PyObject *kwnames)
24762476
Py_XDECREF(traceback);
24772477
if (DEPRECATE("__array__ implementation doesn't accept a copy keyword, "
24782478
"so passing copy=False failed. __array__ must implement "
2479-
"'dtype' and 'copy' keyword arguments.") < 0) {
2479+
"'dtype' and 'copy' keyword arguments. "
2480+
"To learn more, see the migration guide "
2481+
"https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword") < 0) {
24802482
return -1;
24812483
}
24822484
return 0;

0 commit comments

Comments
 (0)
0