pytorch/torch/_numpy/__init__.py
Yuanyuan Chen 0e083942cc Enable PLW0127 in ruff (#165851)
This PR enables `PLW0127` in ruff, which checks self-assignment of variables with the form `var=var`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165851
Approved by: https://github.com/Lucaskabela
2025-10-21 03:30:57 +00:00

35 lines
590 B
Python

# mypy: ignore-errors
from . import fft, linalg, random
from ._dtypes import * # noqa: F403
from ._funcs import * # noqa: F403
from ._getlimits import finfo, iinfo
from ._ndarray import (
array,
asarray,
ascontiguousarray,
can_cast,
from_dlpack,
ndarray,
newaxis,
result_type,
)
from ._ufuncs import * # noqa: F403
from ._util import AxisError, UFuncTypeError
from math import pi, e # usort: skip
all = all # noqa: PLW0127
alltrue = all
any = any # noqa: PLW0127
sometrue = any
inf = float("inf")
nan = float("nan")
False_ = False
True_ = True