Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Reconsidercopy parameter values forasarray function #721

Closed as not planned
Closed as not planned
Labels
wont-fixThis will not be worked on.
@mtsokol

Description

@mtsokol

Hi!

During yesterday's NumPy Triage Call we had a discussion aboutcopy keyword for theasarray function, namelyNone/False/True choice for possible values.

The conclusion was thatasarray(x, copy=None) doesn't convey the message of "make a copy only if needed", and could be replaced with something more expressive.

We came up with other possibilities, like string values:

  • Always copy:asarray(x, copy="always")
  • Copy if needed:asarray(x, copy="ifneeded")
  • Never copy:asarray(x, copy="never")

My question is: Would it make sense to move from None/bool values forcopy keyword to string values in the Array API?

Each library can then use and interpret None/bool as they wish, and only adhere to Array API with new string values that can be passed for library agnostic code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wont-fixThis will not be worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp