From 1d4eacb737847d25a3b1960e84c84179a0950255 Mon Sep 17 00:00:00 2001 From: CCYeh Date: Mon, 24 Nov 2025 23:15:08 +0100 Subject: [PATCH] Fix `mx.core.linspace` type annotation (#2820) Co-authored-by: Awni Hannun --- python/src/ops.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/src/ops.cpp b/python/src/ops.cpp index 25dd3cf51..7c00ad8a1 100644 --- a/python/src/ops.cpp +++ b/python/src/ops.cpp @@ -1445,7 +1445,7 @@ void init_ops(nb::module_& m) { "dtype"_a.none() = mx::float32, "stream"_a = nb::none(), nb::sig( - "def linspace(start, stop, num: Optional[int] = 50, dtype: Optional[Dtype] = float32, stream: Union[None, Stream, Device] = None) -> array"), + "def linspace(start: scalar, stop: scalar, num: Optional[int] = 50, dtype: Optional[Dtype] = float32, stream: Union[None, Stream, Device] = None) -> array"), R"pbdoc( Generate ``num`` evenly spaced numbers over interval ``[start, stop]``.