You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the 2024.12 standard, these should work, but don't:
fromarray_api_compatimporttorchasxpxp.minimum(xp.asarray(1), 2) # TypeError: minimum(): argument 'other' (position 2) must be Tensor, not intxp.minimum(2, xp.asarray(1)) # TypeError: minimum(): argument 'input' (position 1) must be Tensor, not intxp.copysign(xp.asarray(1.), 2) # OKxp.copysign(2, xp.asarray(1.))
# TypeError: copysign() received an invalid combination of arguments - got (int, Tensor), but expected one of:# * (Tensor input, Tensor other, *, Tensor out = None)# * (Tensor input, Number other, *, Tensor out = None)
Looks like maximum also has trouble. Haven't checked the rest of the functions that now accept scalars, but I assume others may have trouble.