Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .mypyignore-todo
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ numpy(\._core(\.(_multiarray_umath|multiarray|numeric|umath))?|\.matlib)?\.sqrt
numpy(\._core(\.(_multiarray_umath|multiarray|numeric|umath))?|\.matlib)?\.cbrt
numpy(\._core(\.(_multiarray_umath|multiarray|numeric|umath))?|\.matlib)?\.vec(dot|mat)

numpy(\.matlib)?\.row_stack

numpy(\..+)?\.object_.__call__
numpy(\..+)?\.timedelta64.__class_getitem__

Expand Down
5 changes: 3 additions & 2 deletions src/numpy-stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ from .lib._shape_base_impl import (
hsplit,
kron,
put_along_axis,
row_stack,
split,
take_along_axis,
tile,
Expand Down Expand Up @@ -544,8 +545,8 @@ __all__ = [ # noqa: RUF022
# lib._scimath_impl
"emath",
# lib._shape_base_impl
"apply_along_axis", "apply_over_axes", "array_split", "column_stack", "dsplit", "dstack", "expand_dims", "hsplit", "kron",
"put_along_axis", "split", "take_along_axis", "tile", "vsplit",
"apply_along_axis", "apply_over_axes", "array_split", "row_stack", "column_stack", "dsplit", "dstack", "expand_dims",
"hsplit", "kron", "put_along_axis", "split", "take_along_axis", "tile", "vsplit",
# lib._stride_tricks_impl.*
"broadcast_arrays", "broadcast_shapes", "broadcast_to",
# lib._twodim_base_impl
Expand Down
15 changes: 12 additions & 3 deletions src/numpy-stubs/lib/_shape_base_impl.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections.abc import Callable, Sequence
from typing import Any, Concatenate, Protocol, SupportsIndex, overload, type_check_only
from typing_extensions import ParamSpec, TypeVar
from typing_extensions import ParamSpec, TypeVar, deprecated

import numpy as np
from _numtype import (
Expand All @@ -15,8 +15,8 @@ from _numtype import (
ToSInteger_nd,
ToUInteger_nd,
)
from numpy._core.shape_base import vstack as row_stack
from numpy._typing import ArrayLike, NDArray, _ArrayLike, _ShapeLike
from numpy import _CastingKind # noqa: ICN003
from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _ShapeLike

__all__ = [
"apply_along_axis",
Expand Down Expand Up @@ -94,6 +94,15 @@ def expand_dims(a: _ArrayLike[_ScalarT], axis: _ShapeLike) -> NDArray[_ScalarT]:
@overload
def expand_dims(a: ArrayLike, axis: _ShapeLike) -> NDArray[Any]: ...

# Deprecated in NumPy 2.0, 2023-08-1
@deprecated("`row_stack` alias is deprecated. Use `np.vstack` directly.")
def row_stack(
tup: Sequence[ArrayLike],
*,
dtype: DTypeLike | None = None,
casting: _CastingKind = "same_kind",
) -> NDArray[Any]: ...

#
@overload
def column_stack(tup: Sequence[_ArrayLike[_ScalarT]]) -> NDArray[_ScalarT]: ...
Expand Down
1 change: 1 addition & 0 deletions src/numpy-stubs/matlib.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ from numpy import ( # noqa: ICN003
roots,
rot90,
round,
row_stack,
# row_stack,
s_,
save,
Expand Down