Skip to content

Commit 59e03ee

Browse files
committed
nits
1 parent 86dc4a0 commit 59e03ee

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

array_api_compat/numpy/linalg.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
from .._internal import clone_module, get_xp
1111
from ..common import _linalg
1212

13-
from .._internal import clone_module
14-
1513
__all__ = clone_module("numpy.linalg", globals())
1614

1715
# These functions are in both the main and linalg namespaces

array_api_compat/torch/linalg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import torch
4+
import torch.linalg
45
from typing import Optional, Union, Tuple
56

67
from .._internal import clone_module
@@ -27,7 +28,7 @@ def cross(x1: Array, x2: Array, /, *, axis: int = -1) -> Array:
2728
if not (x1.shape[axis] == x2.shape[axis] == 3):
2829
raise ValueError(f"cross product axis must have size 3, got {x1.shape[axis]} and {x2.shape[axis]}")
2930
x1, x2 = torch.broadcast_tensors(x1, x2)
30-
return torch_linalg.cross(x1, x2, dim=axis)
31+
return torch.linalg.cross(x1, x2, dim=axis)
3132

3233
def vecdot(x1: Array, x2: Array, /, *, axis: int = -1, **kwargs) -> Array:
3334
from ._aliases import isdtype

0 commit comments

Comments
 (0)