Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pygpu/gpuarray.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,10 @@ cdef GpuArray pygpu_index(GpuArray a, const ssize_t *starts,
const ssize_t *stops, const ssize_t *steps):
cdef GpuArray res
res = new_GpuArray(type(a), a.context, a.base)
array_index(res, a, starts, stops, steps)
try:
array_index(res, a, starts, stops, steps)
except ValueError, e:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this is needed? Can you add a test to make sure this don't get broken again?

raise IndexError, "index out of bounds"
return res

cdef GpuArray pygpu_reshape(GpuArray a, unsigned int nd, const size_t *newdims,
Expand Down