Skip to content

Support complex (float/double) types in array.array and memoryview #146151

Description

@skirpichev

Currently, we have support for this in the struct and the ctypes modules, working rather with heterogeneous binary data. Lets add these types to the array module as well ('F'/'D' type codes).

I think this feature can be available unconditionally, like for the struct module.

Linked PRs

Activity

  1. self-assigned this
    on Mar 19, 2026
  2. serhiy-storchaka commented on Mar 19, 2026

    @serhiy-storchaka
    Member

    If this is supported in the struct module, there is no reasons to not support it in array.array and memoryview.

  3. changed the title [-]Support complex (float/double) types in the array module[/-] [+]Support complex (float/double) types in array.array and memoryview[/+] on Mar 19, 2026
  4. added a commit that references this issue on Mar 21, 2026
  5. removed their assignment
    on Mar 21, 2026
  6. added a commit that references this issue on Mar 21, 2026
  7. skirpichev commented on Mar 21, 2026

    @skirpichev
    MemberAuthor

    BTW, currently the lack of support for 'F'/'D' types in the memoryview looks as a documentation error, it references the struct module formatting types.

  8. added 2 commits that reference this issue on Mar 26, 2026
  9. vstinner commented on Mar 26, 2026

    @vstinner
    Member

    I merged the two PRs (array and memoryview). I close the issue.

  10. added 2 commits that reference this issue on Apr 16, 2026
  11. added 2 commits that reference this issue on Apr 17, 2026
  12. added 2 commits that reference this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions