Closed GoogleCodeExporter closed 9 years ago
The built-in rpyc library used for communication with the remote python server,
makes the incorrect assumption that the slice object would have as start, stop
and step built-in types. Hence, the crash.
I will correct this.
Just a question: is there any reason for using
a.numpy_slice = slice(numpy.int32(2),None,None)
instead of
a.numpy_slice = slice(2,None,None)
Original comment by pyscripter
on 2 Jan 2012 at 7:37
Thanks for the quick reply!
The reason for using a numpy.int32-objects is, that in my code in a loop over a
numpy.array of dtype='<i4' the members of that array are taken as arguments of
the slice-function.
for example:
indices = numpy.array([0,3,5,10,20,25])
for i in indices[:-1]
mySlice = slice(indices[i], indices[i+1], None)
resultArray = anotherArray[mySlice]
newObject = MyClass(resultArray, mySlice)
the newObject needs to know the slice the resultArray was created from
MyClass:
def __init__(self, array, mySlice):
self.array = array
self.mySlice = mySlice
typing "newObject." crashes PyScripter.
indices = numpy.array([0,3,5,10,20,25])
for i in indices[:-1]
i = int(i)
mySlice = slice(indices[i], indices[i+1], None)
resultArray = anotherArray[mySlice]
newObject = MyClass(resultArray, mySlice)
is my workaround so far.
Original comment by bohnet....@googlemail.com
on 3 Jan 2012 at 6:07
Fixed in version control.
Original comment by pyscripter
on 28 Feb 2012 at 7:17
Original issue reported on code.google.com by
bohnet....@googlemail.com
on 2 Jan 2012 at 4:08