From 767b00f7a7511adb421c967ea8384e4b06d39a81 Mon Sep 17 00:00:00 2001 From: Bas van Beek Date: Sun, 3 Sep 2023 17:30:27 +0200 Subject: [PATCH] TYP: Allow `binary_repr` to accept any object implementing `__index__` --- numpy/core/numeric.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/numeric.pyi b/numpy/core/numeric.pyi index eccfb237bbe9..fc10bb88f54a 100644 --- a/numpy/core/numeric.pyi +++ b/numpy/core/numeric.pyi @@ -600,7 +600,7 @@ def isscalar(element: object) -> TypeGuard[ generic | bool | int | float | complex | str | bytes | memoryview ]: ... -def binary_repr(num: int, width: None | int = ...) -> str: ... +def binary_repr(num: SupportsIndex, width: None | int = ...) -> str: ... def base_repr( number: SupportsAbs[float],