We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9552a6 commit 6e18457Copy full SHA for 6e18457
1 file changed
pygpu/gpuarray.pyx
@@ -1937,6 +1937,13 @@ cdef class GpuArray:
1937
res[i] = self.ga.strides[i]
1938
return tuple(res)
1939
1940
+ def __set__(self, newstrides):
1941
+ cdef unsigned int i
1942
+ if len(newstrides) != self.ga.nd:
1943
+ raise ValueError("new strides are the wrong length")
1944
+ for i in range(self.ga.nd):
1945
+ self.ga.strides[i] = newstrides[i]
1946
+
1947
property ndim:
1948
"The number of dimensions in this object"
1949
def __get__(self):
0 commit comments