Skip to content

Commit

Permalink
fix codecheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
KevsterAmp committed Dec 19, 2024
1 parent d466e24 commit 9786ee3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pandas/core/arrays/arrow/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,12 @@ def __array__(
"""Correctly construct numpy arrays when passed to `np.asarray()`."""
if copy is False:
warnings.warn(
"Starting with NumPy 2.0, the behavior of the 'copy' keyword has changed "
"and passing 'copy=False' raises an error when returning a zero-copy NumPy array "
"is not possible. pandas will follow this behavior starting with "
"pandas 3.0.\nThis conversion to NumPy requires a copy, but "
"'copy=False' was passed. Consider using 'np.asarray(..)' instead.",
"Starting with NumPy 2.0, the behavior of the 'copy' keyword has "
"changed and passing 'copy=False' raises an error when returning "
"a zero-copy NumPy array is not possible. pandas will follow "
"this behavior starting with pandas 3.0.\nThis conversion to "
"NumPy requires a copy, but 'copy=False' was passed. Consider "
"using 'np.asarray(..)' instead.",
FutureWarning,
stacklevel=find_stack_level(),
)
Expand Down

0 comments on commit 9786ee3

Please sign in to comment.