Skip to content

Commit 0eb3b7e

Browse files
author
Victor Garcia Reolid
committed
remove checks
Signed-off-by: Victor Garcia Reolid <[email protected]>
1 parent cf75225 commit 0eb3b7e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pytensor/link/numba/dispatch/basic.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,7 @@ def shape_i(x):
437437
def numba_funcify_SortOp(op, node, **kwargs):
438438
@numba_njit
439439
def sort_f(a, axis):
440-
if not isinstance(axis, int):
441-
axis = -1
440+
axis = axis.item()
442441

443442
a_swapped = np.swapaxes(a, axis, -1)
444443
a_sorted = np.sort(a_swapped)
@@ -463,9 +462,6 @@ def numba_funcify_ArgSortOp(op, node, **kwargs):
463462
def argsort_f_kind(kind):
464463
@numba_njit
465464
def argort_vec(X, axis):
466-
if axis > len(X.shape):
467-
raise ValueError("Wrong axis.")
468-
469465
axis = axis.item()
470466

471467
Y = np.swapaxes(X, axis, 0)

0 commit comments

Comments
 (0)