Skip to content

Commit

Permalink
slice size should round up, not down
Browse files Browse the repository at this point in the history
  • Loading branch information
davidweichiang committed Jul 5, 2015
1 parent 8e4f7d8 commit acb59dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycuda/gpuarray.py
Expand Up @@ -786,7 +786,7 @@ def __getitem__(self, index):

array_stride = self.strides[array_axis]

new_shape.append((stop-start)//idx_stride)
new_shape.append((stop-start-1)//idx_stride+1)
new_strides.append(idx_stride*array_stride)
new_offset += array_stride*start

Expand Down

0 comments on commit acb59dc

Please sign in to comment.