Commit 29bb919
committed
[SPARK-57679][PYTHON] Fix numpy type checking
### What changes were proposed in this pull request?
Add a branch to detect `NDArray` for `numpy >= 2.5.0`.
### Why are the changes needed?
Our detection for `NDArray` is a bit fragile. `numpy` changed the type alias in `2.5.0` so we need another way to detect it.
CI is failing - https://github.com/apache/spark/actions/runs/28064134730/job/83087583742
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Local test passed
### Was this patch authored or co-authored using generative AI tooling?
Yes, Claude Code (Opus 4.8 high)
Closes #56757 from gaogaotiantian/fix-numpy-type-checking.
Authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Signed-off-by: Tian Gao <gaogaotiantian@hotmail.com>
(cherry picked from commit 5f7570c)
Signed-off-by: Tian Gao <gaogaotiantian@hotmail.com>1 parent 29caede commit 29bb919
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
160 | 170 | | |
161 | 171 | | |
162 | 172 | | |
| |||
0 commit comments