kron produces F-contiguous?
It seems if I call kron with 2 C-contiguous arrays, it returns an F- contiguous array. Any reason for this (it's not what I wanted)?
On 1 September 2010 19:24, Neal Becker <ndbecker2@gmail.com> wrote:
It seems if I call kron with 2 C-contiguous arrays, it returns an F- contiguous array. Any reason for this (it's not what I wanted)?
Try numpy.linalg.inv ... -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169
Lisandro Dalcin wrote:
On 1 September 2010 19:24, Neal Becker <ndbecker2@gmail.com> wrote:
It seems if I call kron with 2 C-contiguous arrays, it returns an F- contiguous array. Any reason for this (it's not what I wanted)?
Try numpy.linalg.inv ...
I don't understand. What has linalg.inv got to do with kronecker product?
On 2 September 2010 09:27, Neal Becker <ndbecker2@gmail.com> wrote:
Lisandro Dalcin wrote:
On 1 September 2010 19:24, Neal Becker <ndbecker2@gmail.com> wrote:
It seems if I call kron with 2 C-contiguous arrays, it returns an F- contiguous array. Any reason for this (it's not what I wanted)?
Try numpy.linalg.inv ...
I don't understand. What has linalg.inv got to do with kronecker product?
Sorry, incomplete mail... numpy.linalg.inv behave exactly like that. There are many functions that return F arrays for C inputs. -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169
Wed, 01 Sep 2010 18:24:16 -0400, Neal Becker wrote:
It seems if I call kron with 2 C-contiguous arrays, it returns an F- contiguous array. Any reason for this (it's not what I wanted)?
Implementation detail. I don't think we have or want to have a policy of C-contiguous return values -- if you need C-contiguity, you'll need to ensure it by using `ascontiguousarray`. Especially when we later on implement memory access pattern optimizations for ufuncs, such assumptions will break down even more often. -- Pauli Virtanen
participants (3)
-
Lisandro Dalcin -
Neal Becker -
Pauli Virtanen