mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
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
35 lines
590 B
Python
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
|