Hello,
Having a problem with overlapping copies. Memory being freed twice ??? See
below:
ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on
Python 2.4.3 (#1, Apr 3 2006, 18:07:14)
[GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> print numpy.__version__
1.0.1
>>> x = numpy.zeros(10, numpy.object_)
>>> x[:] = [], # set the array to empy lists
>>> x[0] is x[1] # everyone is of course identical
True
>>> x[3:-1] = x[4:] # overlappping copy
>>> x # all is right in the universe
array([[], [], [], [], [], [], [], [], [], []], dtype=object)
>>> for i in range(10): x[i] = [] # set the array with a loop
...
>>> x[0] is x[1] # everyone is of course different
False
>>> x[3:-1] = x[4:] # overlapping copy
>>> x # oops, situation not OK, heap apparently corrupted by
>>> overlapping copy
Bus error
Jim
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion