feat: rewrite resize

add more nodes
This commit is contained in:
2024-07-04 13:05:46 +08:00
parent 134d8e382b
commit 1db63dd3db
25 changed files with 4655 additions and 498 deletions

View File

@@ -0,0 +1,10 @@
def normalize_axis_index(axis, ndim):
# Check if `axis` is in the correct range and normalize it
if axis < -ndim or axis >= ndim:
msg = f"axis {axis} is out of bounds for array of dimension {ndim}"
raise Exception(msg)
if axis < 0:
axis = axis + ndim
return axis