[Numpy-discussion] Problems with Numexpr and discontiguous arrays

Ivan Vilata i Balaguer ivilata at carabos.com
Thu Oct 5 10:59:45 CDT 2006


En/na Tim Hochberg ha escrit::

> Tim Hochberg wrote:
>>>> Ivan Vilata i Balaguer wrote:
>>>>> It seemed that discontiguous arrays worked OK in Numexpr since 
>>>>> r1977 or
>>>>> so, but I have come across some alignment or striding problems 
>>>>> which can
>>>>> be seen with the following code::
> OK, I've checked in a fix for this that makes a copy when the array is 
> not strided in an even multiple of the itemsize. I first tried copying 
> for all discontiguous array, but this resulted in a large speed hit for 
> vanilla strided arrays (a=arange(10)[::2], etc.), so I was more frugal 
> with my copying. I'm not entirely certain that I caught all of the 
> problematic cases, so let me know if you run into any more issues like this.

Great!  For the moment I just can say that the problems I had with that
have disappeared, but I will keep you up to date if I find something
else.  Thank you very much!

::

	Ivan Vilata i Balaguer   >qo<   http://www.carabos.com/
	       Cárabos Coop. V.  V  V   Enjoy Data
	                          ""

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 309 bytes
Desc: OpenPGP digital signature
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20061005/26d91914/attachment-0001.bin 


More information about the Numpy-discussion mailing list