77from typing import cast
88
99from . import _compat
10- from ._compat import is_array_api_obj , is_numpy_array
10+ from ._compat import array_namespace , is_array_api_obj , is_numpy_array
1111from ._typing import Array
1212
13- __all__ = ["in1d" , "mean" ]
13+ __all__ = ["asarrays" , " in1d" , "is_python_scalar " , "mean" ]
1414
1515
1616def in1d (
@@ -33,7 +33,7 @@ def in1d(
3333 https://github.com/numpy/numpy/blob/v1.26.0/numpy/lib/arraysetops.py#L524-L758
3434 """
3535 if xp is None :
36- xp = _compat . array_namespace (x1 , x2 )
36+ xp = array_namespace (x1 , x2 )
3737
3838 # This code is run to make the code significantly faster
3939 if x2 .shape [0 ] < 10 * x1 .shape [0 ] ** 0.145 :
@@ -84,7 +84,7 @@ def mean(
8484 Complex mean, https://github.com/data-apis/array-api/issues/846.
8585 """
8686 if xp is None :
87- xp = _compat . array_namespace (x )
87+ xp = array_namespace (x )
8888
8989 if xp .isdtype (x .dtype , "complex floating" ):
9090 x_real = xp .real (x )
@@ -124,8 +124,8 @@ def asarrays(
124124 ----------
125125 a, b : Array | int | float | complex | bool
126126 Input arrays or scalars. At least one must be an array.
127- xp : ModuleType
128- The standard-compatible namespace for the returned arrays .
127+ xp : array_namespace, optional
128+ The standard-compatible namespace for `x`. Default: infer .
129129
130130 Returns
131131 -------
0 commit comments