Skip to content

Commit

Permalink
Py3 fix, restructure array imports
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jul 11, 2015
1 parent ee9bcd4 commit 68c1fd0
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions pyopencl/array.py
@@ -1,11 +1,6 @@
"""CL device arrays."""

from __future__ import division
from __future__ import absolute_import
import six
from six.moves import range
from six.moves import zip
from functools import reduce
from __future__ import division, absolute_import

__copyright__ = "Copyright (C) 2009 Andreas Kloeckner"

Expand All @@ -32,6 +27,8 @@
OTHER DEALINGS IN THE SOFTWARE.
"""

import six
from six.moves import range, zip, reduce

import numpy as np
import pyopencl.elementwise as elementwise
Expand Down Expand Up @@ -1461,8 +1458,8 @@ def transpose(self, axes=None):
if len(axes) != len(self.shape):
raise ValueError("axes don't match array")

new_shape = [self.shape[axes[i]] for i in xrange(len(axes))]
new_strides = [self.strides[axes[i]] for i in xrange(len(axes))]
new_shape = [self.shape[axes[i]] for i in range(len(axes))]
new_strides = [self.strides[axes[i]] for i in range(len(axes))]

return self._new_with_changes(
self.base_data, self.offset,
Expand Down

0 comments on commit 68c1fd0

Please sign in to comment.