Skip to content

Conversation

@kgryte
Copy link
Contributor

@kgryte kgryte commented Feb 21, 2022

This PR

  • resolves linspace behavior is underspecified for integer dtypes #392 in accordance with discussions during the 2022-02-17 consortium meeting. Namely, linspace should be limited to floating-point output data types, unless a conforming implementation has compelling reasons for supporting integer output data types (e.g., due to backward compatibility). However, integer output behavior is left implementation-defined and should not, in general, be considered portable.
  • adds a note concerning the conversion of int start and stop values to floating-point. Namely, that overflow behavior is implementation-defined. This follows similar guidance elsewhere in the specification.

@kgryte kgryte added API change Changes to existing functions or objects in the API. topic: Creation Array creation. labels Feb 21, 2022
@kgryte kgryte added this to the v2021 milestone Feb 21, 2022
@kgryte
Copy link
Contributor Author

kgryte commented Feb 21, 2022

cc @honno

Copy link
Member

@honno honno left a comment

Choose a reason for hiding this comment

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

LGTM. Good shout on noting non-representable start and stop args.

@kgryte
Copy link
Contributor Author

kgryte commented Feb 28, 2022

As the changes in this PR are straightforward and have been discussed in consortium meetings, will go ahead and merge so that changes, if any, can be updated in the test suite.

@kgryte kgryte merged commit 157c16b into main Feb 28, 2022
@kgryte kgryte deleted the linspace-int-dtypes branch February 28, 2022 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API change Changes to existing functions or objects in the API. topic: Creation Array creation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linspace behavior is underspecified for integer dtypes

3 participants