mirror of
https://github.com/ml-explore/mlx.git
synced 2025-07-21 16:51:15 +08:00
use union instead of | (#358)
This commit is contained in:
parent
1ac18eac20
commit
0d31128a44
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
from typing import Any, Callable, List, Tuple
|
from typing import Any, Callable, List, Tuple, Union
|
||||||
|
|
||||||
import mlx.core as mx
|
import mlx.core as mx
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -21,7 +21,7 @@ class MLXTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
def assertCmpNumpy(
|
def assertCmpNumpy(
|
||||||
self,
|
self,
|
||||||
shape: List[Tuple[int] | Any],
|
shape: List[Union[Tuple[int], Any]],
|
||||||
mx_fn: Callable[..., mx.array],
|
mx_fn: Callable[..., mx.array],
|
||||||
np_fn: Callable[..., np.array],
|
np_fn: Callable[..., np.array],
|
||||||
atol=1e-2,
|
atol=1e-2,
|
||||||
|
Loading…
Reference in New Issue
Block a user