Skip to content

BUG: preserve device for scalars with array input#479

Merged
lucascolley merged 1 commit into
data-apis:mainfrom
OmarManzoor:is_close_device_scalar
Oct 14, 2025
Merged

BUG: preserve device for scalars with array input#479
lucascolley merged 1 commit into
data-apis:mainfrom
OmarManzoor:is_close_device_scalar

Conversation

@OmarManzoor
Copy link
Copy Markdown
Contributor

@OmarManzoor OmarManzoor commented Oct 14, 2025

Fixes #478

  • Allow functions with multiple arrays to allow one of the arguments to be a scalar while the other argument is an array on a device.
  • Modify the asarrays to create the scalar on device when we are dealing with the array API
  • Add a test function within TestIsClose (which was the main function under consideration)

Copy link
Copy Markdown
Member

@lucascolley lucascolley left a comment

Choose a reason for hiding this comment

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

ah yes, I guess we already had most of this in place! SGTM, thanks!

@lucascolley lucascolley changed the title ENH allow Python scalars for functions with multiple arrays BUG: preserve device for scalars with array input Oct 14, 2025
@lucascolley lucascolley added the bug Something isn't working label Oct 14, 2025
@lucascolley lucascolley added this to the 0.9.1 milestone Oct 14, 2025
@lucascolley lucascolley merged commit 8f8047b into data-apis:main Oct 14, 2025
11 checks passed
@OmarManzoor OmarManzoor deleted the is_close_device_scalar branch October 14, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: isclose: scalars cannot be input alongside non-default device arrays

2 participants