GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ENH: dtype API needs an API slot for a single-element copy · Issue #24859 · numpy/numpy

ENH: dtype API needs an API slot for a single-element copy #24859

New issue
Copy link
New issue
Copy link
Open
Open
ENH: dtype API needs an API slot for a single-element copy#24859
Copy link
Labels
component: numpy.dtype

Description

@ngoldbaum
ngoldbaum
opened on Oct 4, 2023
Issue body actions

Currently, users will see seg faults if a user-defined dtype is passed somewhere where copyswap is used internally to copy array elements.

If we require that user-defined dtypes implement a single-element copy operation we will be able to implement a default copyswap implementation for user-defined dtypes which can be used where copyswap is used internally in NumPy.

Activity

  1. ngoldbaum
    added
    component: numpy.dtype
    on Oct 4, 2023
  2. ngoldbaum
    added this to the 2.0.0 release milestone on Oct 4, 2023
  3. seberg commented on Oct 9, 2023

    @seberg
    seberg
    on Oct 9, 2023
    Member
    More actions

    There are two slightly different use-cases here. In most cases, where we need a single element copy, we actually need to copy many, which means preparation is useful/necessary. But in some we may not need it.

    The question is how we deal with allowing preparation (noting that for the majority of dtypes the preparation would be at best specializing for short copies or alignedness and it would be good if NumPy just provides that copy function for those without references at least.).

  4. seberg
    modified the milestones: 2.0.0 release, 2.1.0 release on Jan 31, 2024
  5. seberg commented on Jan 31, 2024

    @seberg
    seberg
    on Jan 31, 2024
    Member
    More actions

    We should do this, but probably not a disaster if it's not in 2.0, I think.

  6. charris
    modified the milestones: 2.1.0 release, 2.2.0 release on Aug 1, 2024
  7. ngoldbaum
    removed this from the 2.2.0 release milestone on Aug 7, 2024
  8. ngoldbaum
    marked BUG: Internal copyswap/copyswapn calls segfault for new-style user DTypes #30795 as a duplicate of this issue on Feb 6, 2026
  9. ngoldbaum commented on Feb 6, 2026

    @ngoldbaum
    ngoldbaum
    on Feb 6, 2026
    MemberAuthor
    More actions

    #30795 has some more motivating examples for how this is still annoying

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

    component: numpy.dtype

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.