2012/9/15 Andreas van Cranenburgh <
and...@unstable.nl>:
>> I've just been trying to replace a dynamically growing Numpy array
>> with a cpython.array one to benefit from its resize_smart
>> capabilities, but I can't seem to figure out how it works. What I have
>> is a Numpy array X that is grown by calling resize(2 * X.size)
>> whenever it's full. I can replace it with an ordinary Python array,
>> calling its append member, but that doesn't get Cythonized properly.
>
> resize and resize_smart are at the module level and should be called with an
> array instance as first argument.
Just to let you know, I've finally got some time to get back to this
project and it works now. Thanks!
> However, note that using its append and extend methods would trigger the
> same behavior internally.
Yes, but a call to append shows up yellow in cython -a output, so I
want to avoid it. I've yet to do a full benchmark, but the HTML file
is looking ever whiter :)