Skip to content

Guard np.row_stack overload for numpy < 2.5 (#907) - #916

Open
CodersAcademy006 wants to merge 1 commit into
NVIDIA:mainfrom
CodersAcademy006:fix/numpy-2.5-row-stack
Open

Guard np.row_stack overload for numpy < 2.5 (#907)#916
CodersAcademy006 wants to merge 1 commit into
NVIDIA:mainfrom
CodersAcademy006:fix/numpy-2.5-row-stack

Conversation

@CodersAcademy006

Copy link
Copy Markdown

Summary

numpy 2.5 removes np.row_stack. The overload was registered unconditionally for numpy_version >= (2, 0), so it breaks under numpy 2.5. This bounds it to [2.0, 2.5), mirroring the upstream numba fix in numba/numba#10645 (as suggested by the reporter).

Change

numba_cuda/numba/cuda/np/arrayobj.py:

-if numpy_version >= (2, 0):
+if numpy_version >= (2, 0) and numpy_version < (2, 5):
     overload(np.row_stack)(impl_np_vstack)

Closes #907

cc @gmarkall

numpy 2.5 removes np.row_stack, so overloading it unconditionally for
numpy >= 2.0 fails on numpy 2.5. Bound the overload to [2.0, 2.5) to
match upstream numba (numba/numba#10645).

Closes NVIDIA#907

Signed-off-by: Srijan Upadhyay <srjnupadhyay@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Support numpy 2.5

1 participant