Skip to content

Align casting methods with Python behaviour#497

Merged
kgryte merged 15 commits intodata-apis:mainfrom
honno:dunder-complex
Dec 14, 2022
Merged

Align casting methods with Python behaviour#497
kgryte merged 15 commits intodata-apis:mainfrom
honno:dunder-complex

Conversation

@honno
Copy link
Member

@honno honno commented Oct 18, 2022

Resolves #486 (adding x.__complex__()).

Per interest in having the builtin casting methods (__bool__/__int__/__float__/__complex__/__index__) support arrays of a different dtype kind, this PR also changes the language to clarify that adopters can support such casting. EDIT: now aligning casting methods with Python behaviour generally

(I opted against requiring cross-kind casting in this PR—see #486 (comment)) See #486 (comment)

Loading
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add __complex__ to array object

5 participants