Repository: numpy/numpy
File: numpy/ma/core.pyi (Python)

Code before:
        indices: _ArrayLikeInt_co,
        axis: SupportsIndex | None,
        out: _ArrayT,
        mode: _ModeKind = 'raise',
    ) -> _ArrayT: ...
    @overload
    def take(
        self,
        indices: _ArrayLikeInt_co,
        axis: SupportsIndex | None = None,
        *,
        out: _ArrayT,
        mode: _ModeKind = 'raise',
    ) -> _ArrayT: ...

    copy: Any
    diagonal: Any
    flatten: Any
    repeat: Any
    squeeze: Any

    def swapaxes(
        self,
        axis1: SupportsIndex,
        axis2: SupportsIndex,
    ) -> MaskedArray[_Shape, _DTypeT_co]: ...

    T: Any
    transpose: Any

    @property  # type: ignore[misc]
    def mT(self): ...

    #
    def toflex(self) -> Incomplete: ...
    def torecords(self) -> Incomplete: ...
    def tolist(self, fill_value: Incomplete | None = None) -> Incomplete: ...
    @deprecated("tostring() is deprecated. Use tobytes() instead.")
    def tostring(self, /, fill_value: Incomplete | None = None, order: _OrderKACF = "C") -> bytes: ...  # type: ignore[override]
    def tobytes(self, /, fill_value: Incomplete | None = None, order: _OrderKACF = "C") -> bytes: ...  # type: ignore[override]
    def tofile(self, /, fid: Incomplete, sep: str = "", format: str = "%s") -> Incomplete: ...

    #
    def __reduce__(self): ...
    def __deepcopy__(self, memo=...): ...

class mvoid(MaskedArray[_ShapeT_co, _DTypeT_co]):
    def __new__(
        self,  # pyright: ignore[reportSelfClsParameterName]
        data,
        mask=...,

Review comment (suggestion):
apparently

```pycon
>>> import numpy as np
>>> a = np.ma.array(np.eye(3))
>>> a.swapaxes(axis1=1,axis2=0)
Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    a.swapaxes(axis1=1,axis2=0)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/joren/.pyenv/versions/3.13.3/lib/python3.13/site-packages/numpy/ma/core.py", line 2638, in wrapped_method
    result = getattr(self._data, funcname)(*args, **params)
TypeError: swapaxes() takes no keyword arguments
```

so

```suggestion
    def swapaxes(
        self,
        axis1: SupportsIndex,
        axis2: SupportsIndex,
        /,
    ) -> MaskedArray[_Shape, _DTypeT_co]: ...
```

Code after:
        self,
        indices: _ArrayLikeInt_co,
        axis: SupportsIndex | None,
        out: _ArrayT,
        mode: _ModeKind = 'raise',
    ) -> _ArrayT: ...
    @overload
    def take(
        self,
        indices: _ArrayLikeInt_co,
        axis: SupportsIndex | None = None,
        *,
        out: _ArrayT,
        mode: _ModeKind = 'raise',
    ) -> _ArrayT: ...

    copy: Any
    diagonal: Any
    flatten: Any

    @overload
    def repeat(
        self,
        repeats: _ArrayLikeInt_co,
        axis: None = None,
    ) -> MaskedArray[tuple[int], _DTypeT_co]: ...
    @overload
    def repeat(
        self,
        repeats: _ArrayLikeInt_co,
        axis: SupportsIndex,
    ) -> MaskedArray[_Shape, _DTypeT_co]: ...

    squeeze: Any

    def swapaxes(
        self,
        axis1: SupportsIndex,
        axis2: SupportsIndex,
        /
    ) -> MaskedArray[_Shape, _DTypeT_co]: ...

    T: Any
    transpose: Any

    @property  # type: ignore[misc]
    def mT(self): ...

    #
    def toflex(self) -> Incomplete: ...
    def torecords(self) -> Incomplete: ...