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

Closes #1012 .astype() method #1160

Merged
merged 1 commit into from
Feb 28, 2022

Conversation

Ethan-DeBandi99
Copy link
Contributor

This PR (closes #1012):

  • .astype() method added for pdarray
  • .astype() method added for Strings.

Both .astype() methods take in a str or np.dtype (same as cast()). These methods serve as an alias for ak.cast(). Calling x.astype('<dtype>') results in a call to ak.cast(x, '<dtype>').

I did not add testing for this because testing for ak.cast() is already in place, and additional testing here would be the same. I can add tests if we would prefer to have testing dedicated to these functions.

@mhmerrill mhmerrill merged commit 5e6e1c1 into Bears-R-Us:master Feb 28, 2022
@Ethan-DeBandi99 Ethan-DeBandi99 deleted the 1012_astype_method branch March 1, 2022 18:56
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.

Add .astype() method
4 participants