-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Code is unexpectedly marked as unreachable #3195
Copy link
Copy link
Closed
Description
Environment data
- Language Server version: Pylance language server 2022.8.20 (pyright 888eb243)
- OS and version: macOS 12.5 (arm64)
- Python version (& distribution if applicable, e.g. Anaconda): Miniconda CPython 3.9.12
Code Snippet
import numpy as np
x = np.array([1,2,3])
y = np.array([2,3,4])
z = np.cross(x, y)
print(z)Repro Steps
- Install
numpydependencies and run the above code.
Expected behavior
Code should not be marked as unreachable
Actual behavior
The last line of code print(z) is marked as unreachable.
It is also observed in other Python scripts where sections of code followed by np.cross() are marked as unreachable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels