Numpy typing is a little weird
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
Some of the numpy types being inferred are technically correct, but not as expected.
```python
import numpy as np
from numpy.typing import NDArray
def calculate() -> NDArray:
return np.zeros(1000)
```
In a minimal example as above, I get the type hint that zeros is an attribute:
When I navigate to zeros, it takes me to the __all__ list that exports it, but not to the function:
It also doesn't understand the NDArray return type at all:
Neovim version:
```
NVIM v0.12.2
Build type: Release
LuaJIT 2.1.1774638290
```
Pyrefly version: `1.0.0`
Numpy version: `2.4.2`
Python version: `3.14`
Please let me know what other information is needed, not sure what logs would be helpful, but happy to provide whatever requested
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.