@@ -278,7 +278,7 @@ class _ConstructorEmpty(Protocol):
278278 self ,
279279 / ,
280280 shape : SupportsIndex ,
281- dtype : DTypeLike ,
281+ dtype : DTypeLike | None = ... ,
282282 order : _OrderCF = ...,
283283 ** kwargs : Unpack [_KwargsEmpty ],
284284 ) -> _Array1D [Any ]: ...
@@ -316,7 +316,7 @@ class _ConstructorEmpty(Protocol):
316316 self ,
317317 / ,
318318 shape : _AnyShapeType ,
319- dtype : DTypeLike ,
319+ dtype : DTypeLike | None = ... ,
320320 order : _OrderCF = ...,
321321 ** kwargs : Unpack [_KwargsEmpty ],
322322 ) -> _Array [_AnyShapeType , Any ]: ...
@@ -348,9 +348,10 @@ class _ConstructorEmpty(Protocol):
348348 ) -> NDArray [_SCT ]: ...
349349 @overload
350350 def __call__ (
351- self , / ,
351+ self ,
352+ / ,
352353 shape : _ShapeLike ,
353- dtype : DTypeLike ,
354+ dtype : DTypeLike | None = ... ,
354355 order : _OrderCF = ...,
355356 ** kwargs : Unpack [_KwargsEmpty ],
356357 ) -> NDArray [Any ]: ...
@@ -419,16 +420,6 @@ def empty_like(
419420 device : None | L ["cpu" ] = ...,
420421) -> NDArray [_SCT ]: ...
421422@overload
422- def empty_like (
423- prototype : object ,
424- dtype : None = ...,
425- order : _OrderKACF = ...,
426- subok : bool = ...,
427- shape : None | _ShapeLike = ...,
428- * ,
429- device : None | L ["cpu" ] = ...,
430- ) -> NDArray [Any ]: ...
431- @overload
432423def empty_like (
433424 prototype : Any ,
434425 dtype : _DTypeLike [_SCT ],
@@ -441,7 +432,7 @@ def empty_like(
441432@overload
442433def empty_like (
443434 prototype : Any ,
444- dtype : DTypeLike ,
435+ dtype : DTypeLike | None = ... ,
445436 order : _OrderKACF = ...,
446437 subok : bool = ...,
447438 shape : None | _ShapeLike = ...,
@@ -483,17 +474,6 @@ def array(
483474 like : None | _SupportsArrayFunc = ...,
484475) -> NDArray [_SCT ]: ...
485476@overload
486- def array (
487- object : object ,
488- dtype : None = ...,
489- * ,
490- copy : None | bool | _CopyMode = ...,
491- order : _OrderKACF = ...,
492- subok : bool = ...,
493- ndmin : int = ...,
494- like : None | _SupportsArrayFunc = ...,
495- ) -> NDArray [Any ]: ...
496- @overload
497477def array (
498478 object : Any ,
499479 dtype : _DTypeLike [_SCT ],
@@ -507,7 +487,7 @@ def array(
507487@overload
508488def array (
509489 object : Any ,
510- dtype : DTypeLike ,
490+ dtype : DTypeLike | None = ... ,
511491 * ,
512492 copy : None | bool | _CopyMode = ...,
513493 order : _OrderKACF = ...,
@@ -556,15 +536,6 @@ def concatenate( # type: ignore[misc]
556536 casting : None | _CastingKind = ...
557537) -> NDArray [_SCT ]: ...
558538@overload
559- def concatenate ( # type: ignore[misc]
560- arrays : SupportsLenAndGetItem [ArrayLike ],
561- / ,
562- axis : None | SupportsIndex = ...,
563- out : None = ...,
564- * ,
565- dtype : None = ...,
566- casting : None | _CastingKind = ...
567- ) -> NDArray [Any ]: ...
568539@overload
569540def concatenate ( # type: ignore[misc]
570541 arrays : SupportsLenAndGetItem [ArrayLike ],
@@ -582,7 +553,7 @@ def concatenate( # type: ignore[misc]
582553 axis : None | SupportsIndex = ...,
583554 out : None = ...,
584555 * ,
585- dtype : DTypeLike ,
556+ dtype : DTypeLike | None = None ,
586557 casting : None | _CastingKind = ...
587558) -> NDArray [Any ]: ...
588559@overload
@@ -717,16 +688,6 @@ def asarray(
717688 like : None | _SupportsArrayFunc = ...,
718689) -> NDArray [_SCT ]: ...
719690@overload
720- def asarray (
721- a : object ,
722- dtype : None = ...,
723- order : _OrderKACF = ...,
724- * ,
725- device : None | L ["cpu" ] = ...,
726- copy : None | bool = ...,
727- like : None | _SupportsArrayFunc = ...,
728- ) -> NDArray [Any ]: ...
729- @overload
730691def asarray (
731692 a : Any ,
732693 dtype : _DTypeLike [_SCT ],
@@ -739,7 +700,7 @@ def asarray(
739700@overload
740701def asarray (
741702 a : Any ,
742- dtype : DTypeLike ,
703+ dtype : DTypeLike | None = ... ,
743704 order : _OrderKACF = ...,
744705 * ,
745706 device : None | L ["cpu" ] = ...,
@@ -768,16 +729,6 @@ def asanyarray(
768729 like : None | _SupportsArrayFunc = ...,
769730) -> NDArray [_SCT ]: ...
770731@overload
771- def asanyarray (
772- a : object ,
773- dtype : None = ...,
774- order : _OrderKACF = ...,
775- * ,
776- device : None | L ["cpu" ] = ...,
777- copy : None | bool = ...,
778- like : None | _SupportsArrayFunc = ...,
779- ) -> NDArray [Any ]: ...
780- @overload
781732def asanyarray (
782733 a : Any ,
783734 dtype : _DTypeLike [_SCT ],
@@ -790,7 +741,7 @@ def asanyarray(
790741@overload
791742def asanyarray (
792743 a : Any ,
793- dtype : DTypeLike ,
744+ dtype : DTypeLike | None = ... ,
794745 order : _OrderKACF = ...,
795746 * ,
796747 device : None | L ["cpu" ] = ...,
@@ -806,13 +757,6 @@ def ascontiguousarray(
806757 like : None | _SupportsArrayFunc = ...,
807758) -> NDArray [_SCT ]: ...
808759@overload
809- def ascontiguousarray (
810- a : object ,
811- dtype : None = ...,
812- * ,
813- like : None | _SupportsArrayFunc = ...,
814- ) -> NDArray [Any ]: ...
815- @overload
816760def ascontiguousarray (
817761 a : Any ,
818762 dtype : _DTypeLike [_SCT ],
@@ -822,7 +766,7 @@ def ascontiguousarray(
822766@overload
823767def ascontiguousarray (
824768 a : Any ,
825- dtype : DTypeLike ,
769+ dtype : DTypeLike | None = ... ,
826770 * ,
827771 like : None | _SupportsArrayFunc = ...,
828772) -> NDArray [Any ]: ...
@@ -835,13 +779,6 @@ def asfortranarray(
835779 like : None | _SupportsArrayFunc = ...,
836780) -> NDArray [_SCT ]: ...
837781@overload
838- def asfortranarray (
839- a : object ,
840- dtype : None = ...,
841- * ,
842- like : None | _SupportsArrayFunc = ...,
843- ) -> NDArray [Any ]: ...
844- @overload
845782def asfortranarray (
846783 a : Any ,
847784 dtype : _DTypeLike [_SCT ],
@@ -851,7 +788,7 @@ def asfortranarray(
851788@overload
852789def asfortranarray (
853790 a : Any ,
854- dtype : DTypeLike ,
791+ dtype : DTypeLike | None = ... ,
855792 * ,
856793 like : None | _SupportsArrayFunc = ...,
857794) -> NDArray [Any ]: ...
@@ -880,7 +817,7 @@ def fromstring(
880817@overload
881818def fromstring (
882819 string : str | bytes ,
883- dtype : DTypeLike ,
820+ dtype : DTypeLike | None = ... ,
884821 count : SupportsIndex = ...,
885822 * ,
886823 sep : str ,
@@ -983,7 +920,7 @@ def fromfile(
983920@overload
984921def fromfile (
985922 file : StrOrBytesPath | _SupportsFileMethods ,
986- dtype : DTypeLike ,
923+ dtype : DTypeLike | None = ... ,
987924 count : SupportsIndex = ...,
988925 sep : str = ...,
989926 offset : SupportsIndex = ...,
@@ -1029,7 +966,7 @@ def frombuffer(
1029966@overload
1030967def frombuffer (
1031968 buffer : _SupportsBuffer ,
1032- dtype : DTypeLike ,
969+ dtype : DTypeLike | None = ... ,
1033970 count : SupportsIndex = ...,
1034971 offset : SupportsIndex = ...,
1035972 * ,
@@ -1122,7 +1059,7 @@ def arange(
11221059def arange (
11231060 stop : Any , / ,
11241061 * ,
1125- dtype : DTypeLike ,
1062+ dtype : DTypeLike | None = ... ,
11261063 device : None | L ["cpu" ] = ...,
11271064 like : None | _SupportsArrayFunc = ...,
11281065) -> _Array1D [Any ]: ...
@@ -1131,7 +1068,7 @@ def arange(
11311068 start : Any ,
11321069 stop : Any ,
11331070 step : Any = ...,
1134- dtype : DTypeLike = ...,
1071+ dtype : DTypeLike | None = ...,
11351072 * ,
11361073 device : None | L ["cpu" ] = ...,
11371074 like : None | _SupportsArrayFunc = ...,
0 commit comments