Skip to content

Commit 090f570

Browse files
committed
Add a wrapper for torch.copysign
1 parent 51daace commit 090f570

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

array_api_compat/torch/_aliases.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def can_cast(from_: Union[Dtype, array], to: Dtype, /) -> bool:
155155
bitwise_or = _two_arg(torch.bitwise_or)
156156
bitwise_right_shift = _two_arg(torch.bitwise_right_shift)
157157
bitwise_xor = _two_arg(torch.bitwise_xor)
158+
copysign = _two_arg(torch.copysign)
158159
divide = _two_arg(torch.divide)
159160
# Also a rename. torch.equal does not broadcast
160161
equal = _two_arg(torch.eq)
@@ -702,9 +703,9 @@ def take(x: array, indices: array, /, *, axis: Optional[int] = None, **kwargs) -
702703

703704
__all__ = ['result_type', 'can_cast', 'permute_dims', 'bitwise_invert',
704705
'newaxis', 'add', 'atan2', 'bitwise_and', 'bitwise_left_shift',
705-
'bitwise_or', 'bitwise_right_shift', 'bitwise_xor', 'divide',
706-
'equal', 'floor_divide', 'greater', 'greater_equal', 'less',
707-
'less_equal', 'logaddexp', 'multiply', 'not_equal', 'pow',
706+
'bitwise_or', 'bitwise_right_shift', 'bitwise_xor', 'copysign',
707+
'divide', 'equal', 'floor_divide', 'greater', 'greater_equal',
708+
'less', 'less_equal', 'logaddexp', 'multiply', 'not_equal', 'pow',
708709
'remainder', 'subtract', 'max', 'min', 'sort', 'prod', 'sum',
709710
'any', 'all', 'mean', 'std', 'var', 'concat', 'squeeze',
710711
'broadcast_to', 'flip', 'roll', 'nonzero', 'where', 'reshape',

0 commit comments

Comments
 (0)