Skip to content

Commit dd450d9

Browse files
committed
TYP: fix incorrect import in ma/extras.pyi stub
The `numpy.ma` tests for type stubs are missing, so this kind of obvious error has a chance of creeping in. The import in the type stub now matches the one in the corresponding .py file again. Also add the start of a very basic "pass" typing test for numpy.ma [skip azp] [skip cirrus] [skip circle]
1 parent ccff7fb commit dd450d9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

numpy/ma/extras.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Any
2-
from numpy.lib.index_tricks import AxisConcatenator
2+
3+
from numpy.lib._index_tricks_impl import AxisConcatenator
34

45
from numpy.ma.core import (
56
dot as dot,

numpy/typing/tests/data/pass/ma.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from typing import Any
2+
3+
import numpy as np
4+
import numpy.ma
5+
6+
7+
m : np.ma.MaskedArray[Any, np.dtype[np.float64]] = np.ma.masked_array([1.5, 2, 3], mask=[True, False, True])
8+

0 commit comments

Comments
 (0)