-
Notifications
You must be signed in to change notification settings - Fork 45
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
TST: Test copy behavior in astype #335
base: master
Are you sure you want to change the base?
Conversation
""" | ||
Assert copy=True/False functionality is respected | ||
|
||
TODO: we're not able to check scalars with this approach |
There was a problem hiding this comment.
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
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 |
There was a problem hiding this comment.
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 likeasarray(copy=True)
.astype(copy=False)
should behave likeasarray(copy=None)
.asarray(copy=False)
has no matching behaviour inastype
.
@lithomas1 any update on this? |
Planning on circling back since the dask PR is merged now. |
The copy keyword was previously not checked.