Skip to content

Commit e383441

Browse files
committed
Wrap hypot in torch
1 parent 25da0e4 commit e383441

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

array_api_compat/torch/_aliases.py

+11-10
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ def can_cast(from_: Union[Dtype, array], to: Dtype, /) -> bool:
162162
floor_divide = _two_arg(torch.floor_divide)
163163
greater = _two_arg(torch.greater)
164164
greater_equal = _two_arg(torch.greater_equal)
165+
hypot = _two_arg(torch.hypot)
165166
less = _two_arg(torch.less)
166167
less_equal = _two_arg(torch.less_equal)
167168
logaddexp = _two_arg(torch.logaddexp)
@@ -707,15 +708,15 @@ def take(x: array, indices: array, /, *, axis: Optional[int] = None, **kwargs) -
707708
'newaxis', 'add', 'atan2', 'bitwise_and', 'bitwise_left_shift',
708709
'bitwise_or', 'bitwise_right_shift', 'bitwise_xor', 'copysign',
709710
'divide', 'equal', 'floor_divide', 'greater', 'greater_equal',
710-
'less', 'less_equal', 'logaddexp', 'multiply', 'not_equal', 'pow',
711-
'remainder', 'subtract', 'max', 'min', 'clip', 'sort', 'prod',
712-
'sum', 'any', 'all', 'mean', 'std', 'var', 'concat', 'squeeze',
713-
'broadcast_to', 'flip', 'roll', 'nonzero', 'where', 'reshape',
714-
'arange', 'eye', 'linspace', 'full', 'ones', 'zeros', 'empty',
715-
'tril', 'triu', 'expand_dims', 'astype', 'broadcast_arrays',
716-
'UniqueAllResult', 'UniqueCountsResult', 'UniqueInverseResult',
717-
'unique_all', 'unique_counts', 'unique_inverse', 'unique_values',
718-
'matmul', 'matrix_transpose', 'vecdot', 'tensordot', 'isdtype',
719-
'take']
711+
'hypot', 'less', 'less_equal', 'logaddexp', 'multiply', 'not_equal',
712+
'pow', 'remainder', 'subtract', 'max', 'min', 'clip', 'sort',
713+
'prod', 'sum', 'any', 'all', 'mean', 'std', 'var', 'concat',
714+
'squeeze', 'broadcast_to', 'flip', 'roll', 'nonzero', 'where',
715+
'reshape', 'arange', 'eye', 'linspace', 'full', 'ones', 'zeros',
716+
'empty', 'tril', 'triu', 'expand_dims', 'astype',
717+
'broadcast_arrays', 'UniqueAllResult', 'UniqueCountsResult',
718+
'UniqueInverseResult', 'unique_all', 'unique_counts',
719+
'unique_inverse', 'unique_values', 'matmul', 'matrix_transpose',
720+
'vecdot', 'tensordot', 'isdtype', 'take']
720721

721722
_all_ignore = ['torch', 'get_xp']

0 commit comments

Comments
 (0)