Skip to content

Conversation

lithomas1
Copy link

@lithomas1 lithomas1 commented Jan 16, 2025

The copy keyword was previously not checked.

"""
Assert copy=True/False functionality is respected

TODO: we're not able to check scalars with this approach
Copy link
Contributor

@crusaderky crusaderky Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should definitely be able to check 0-dimensional arrays. What we can't check is np.generic, which AFAIK is a numpy-specific type

Comment on lines +497 to +501
def assert_kw_copy(func_name, x, out, data, copy):
"""
Assert copy=True/False functionality is respected

TODO: we're not able to check scalars with this approach
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right.

  • astype(copy=True) should behave like asarray(copy=True).
  • astype(copy=False) should behave like asarray(copy=None).
  • asarray(copy=False) has no matching behaviour in astype.

@crusaderky
Copy link
Contributor

@lithomas1 any update on this?

@lithomas1
Copy link
Author

@lithomas1 any update on this?

Planning on circling back since the dask PR is merged now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants