Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #75 from davidweichiang/master
slice size should round up, not down
  • Loading branch information
inducer committed Jul 5, 2015
2 parents 8e4f7d8 + acb59dc commit e55c48f
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 e55c48f

Please sign in to comment.