Skip to content

Specify output array data types #57

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

Merged
merged 13 commits into from
Nov 6, 2020
Merged

Specify output array data types #57

merged 13 commits into from
Nov 6, 2020

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented Oct 19, 2020

This PR

  • specifies the output array data types for each functional API.

Notes

  • the current draft includes one TODO, which concerns the output data type when returning counts from unique.

@rgommers
Copy link
Member

This looks like a good idea to me.

@asmeurer
Copy link
Member

asmeurer commented Nov 2, 2020

This looks good to me too.

For the "either float32 or float64" cases, should we require any kind of consistency, e.g., an array library always has a "default float dtype" that is used in these cases? Also, should it at least require the same float dtype when the argument(s) themselves promote to a float dtype (e.g., float32 + float32 should always be float32 and float64 + float64 should always be float64)?

@rgommers
Copy link
Member

rgommers commented Nov 3, 2020

For the "either float32 or float64" cases, should we require any kind of consistency, e.g., an array library always has a "default float dtype" that is used in these cases?

Yes, I believe I suggested that somewhere as well. That would also cut down on repeated content.

Also, should it at least require the same float dtype when the argument(s) themselves promote to a float dtype (e.g., float32 + float32 should always be float32 and float64 + float64 should always be float64)?

I think that's already covered by type promotion rules, no need to spell that out.

@kgryte kgryte changed the title WIP: specify output array data types Specify output array data types Nov 4, 2020
@kgryte
Copy link
Contributor Author

kgryte commented Nov 4, 2020

@rgommers This PR (and OP) have been updated. Should be ready for formal review.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks @kgryte, this is pretty comprehensive, overall looks good. A couple of small issues.

@kgryte
Copy link
Contributor Author

kgryte commented Nov 5, 2020

Addressed feedback.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM now, merging. Thanks @kgryte!

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.

3 participants