We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug I am getting a PD011 warning about accessing the values attribute of the torch.Tensor.sort return type NamedTuple.
PD011
values
torch.Tensor.sort
NamedTuple
To Reproduce
[tool.ruff.lint] select = [ 'PD', # pandas-vet ]
$ ruff --version ruff 0.1.14 $ python -c "import torch; print(torch.__version__)" 2.2.0 $ ruff check a.py
import torch def func(tensor: torch.Tensor) -> torch.Tensor: flattened_tensor = tensor.view(-1) return flattened_tensor.sort(dim=-3).values[:, :, 10] # PD011 Use `.to_numpy()` instead of `.values`
Expected behavior This is not a pandas object, I don't expect to receive pandas warnings about it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
I am getting a
PD011
warning about accessing thevalues
attribute of thetorch.Tensor.sort
return typeNamedTuple
.To Reproduce
Expected behavior
This is not a pandas object, I don't expect to receive pandas warnings about it.
The text was updated successfully, but these errors were encountered: