[Numpy-discussion] Preliminary thoughts on implementing __matmul__
cjw at ncf.ca
Thu Aug 7 08:17:20 EDT 2014
On 07/08/2014 5:40 AM, Sebastian Berg wrote:
> On Mi, 2014-08-06 at 14:05 -0700, Chris Barker wrote:
>> On Wed, Aug 6, 2014 at 8:32 AM, Charles R Harris
>> <charlesr.harris at gmail.com> wrote:
>> Should also mention that we don't have the ability to operate
>> on stacked vectors because they can't be identified by
>> dimension info. One workaround is to add dummy dimensions
>> where needed, another is to add two flags, row and col, and
>> set them appropriately.
>> I've thought for ages that if you want to naturally do linear algebra,
>> you need to capture the concept of a row and column vector as distinct
>> from each-other and from (1,n) and (n,1) shape arrays. So:
It's a pity that these ideas weren't incorporatated into the Numarray
The treatment of the scalar was also questionable.
There's time to fix these things.
> As a first thought I am against flags. We have dot, and vdot, which
> ideally would at some point do stacked matrix-matrix and stacked
> vector-vector (albeit vdot does complex conjugation). vector-matrix and
> matrix-vector would require the user to use (1, n) or (n, 1) matrices.
> If someone can convince me that this is a big deal, flags might be the
> only option, though...
That's a basic question: Is dot a big deal? Unfortunately, this wasn't
examined carefully enough last Spring.
> - Sebastian
>> Christopher Barker, Ph.D.
>> Emergency Response Division
>> NOAA/NOS/OR&R (206) 526-6959 voice
>> 7600 Sand Point Way NE (206) 526-6329 fax
>> Seattle, WA 98115 (206) 526-6317 main reception
>> Chris.Barker at noaa.gov
>> NumPy-Discussion mailing list
>> NumPy-Discussion at scipy.org
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
More information about the NumPy-Discussion