We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65e83a6 commit 2a1924dCopy full SHA for 2a1924d
1 file changed
src/fast_array_utils/stats/_mean_var.py
@@ -36,15 +36,11 @@ def mean_var_(
36
from . import mean
37
38
if isinstance(x, np.ndarray | types.CSBase):
39
- float64 = np.float64
+ xp = np
40
else:
41
import array_api_compat
42
43
- if array_api_compat.is_array_api_obj(x):
44
- xp = array_api_compat.array_namespace(x)
45
- float64 = xp.float64
46
- else:
47
+ xp = array_api_compat.array_namespace(x) if array_api_compat.is_array_api_obj(x) else np
48
49
if axis is not None and isinstance(x, types.CSBase):
50
mean_, var = _sparse_mean_var(x, axis=axis)
0 commit comments