22
33import warnings
44
5- from ._lib import _compat , _utils
6- from ._lib ._compat import array_namespace
7- from ._lib ._typing import Array , ModuleType
5+ from ._utils import _compat , _helpers
6+ from ._utils ._compat import array_namespace
7+ from ._utils ._typing import Array , ModuleType
88
99__all__ = [
1010 "atleast_nd" ,
@@ -136,7 +136,7 @@ def cov(m: Array, /, *, xp: ModuleType | None = None) -> Array:
136136 m = atleast_nd (m , ndim = 2 , xp = xp )
137137 m = xp .astype (m , dtype )
138138
139- avg = _utils .mean (m , axis = 1 , xp = xp )
139+ avg = _helpers .mean (m , axis = 1 , xp = xp )
140140 fact = m .shape [1 ] - 1
141141
142142 if fact <= 0 :
@@ -449,7 +449,7 @@ def setdiff1d(
449449 else :
450450 x1 = xp .unique_values (x1 )
451451 x2 = xp .unique_values (x2 )
452- return x1 [_utils .in1d (x1 , x2 , assume_unique = True , invert = True , xp = xp )]
452+ return x1 [_helpers .in1d (x1 , x2 , assume_unique = True , invert = True , xp = xp )]
453453
454454
455455def sinc (x : Array , / , * , xp : ModuleType | None = None ) -> Array :
@@ -546,8 +546,8 @@ def pad(
546546 pad_width : int ,
547547 mode : str = "constant" ,
548548 * ,
549- xp : ModuleType | None = None ,
550549 constant_values : bool | int | float | complex = 0 ,
550+ xp : ModuleType | None = None ,
551551) -> Array :
552552 """
553553 Pad the input array.
@@ -561,10 +561,10 @@ def pad(
561561 mode : str, optional
562562 Only "constant" mode is currently supported, which pads with
563563 the value passed to `constant_values`.
564- xp : array_namespace, optional
565- The standard-compatible namespace for `x`. Default: infer.
566564 constant_values : python scalar, optional
567565 Use this value to pad the input. Default is zero.
566+ xp : array_namespace, optional
567+ The standard-compatible namespace for `x`. Default: infer.
568568
569569 Returns
570570 -------
0 commit comments