-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Open
Labels
00 - Bug40 - array API standardPRs and issues related to support for the array API standardPRs and issues related to support for the array API standard
Milestone
Description
Describe the issue:
reduction (e.g. xp.sum) are expected to produce arrays, but in numpy they produce scalars, that don't follow array api specifications (e.g. I can't use dlpack on those).
In numpy v1, np.array_api correctly returned arrays in this case
Reproduce the code example:
import numpy as np
x = np.zeros([3, 4])
type(x.__array_namespace__().sum(x))
# outputs: numpy.float64 expected: numpy.ndarrayPython and NumPy Versions:
2.0.1
3.11.9 (main, Apr 6 2024, 17:59:24) [GCC 11.4.0]
Metadata
Metadata
Assignees
Labels
00 - Bug40 - array API standardPRs and issues related to support for the array API standardPRs and issues related to support for the array API standard