Re: [Numpy-discussion] matrix problem: float to matrix power

2007-11-01 Thread Timothy Hochberg
On Nov 1, 2007 12:20 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Wed, 31 Oct 2007, Timothy Hochberg apparently wrote: > > because M**n results in the matrix power of n. It would be > > confusing if n**M did a broadcast element wise power. > > > > In an attempt to summarize: > scalar to a matr

Re: [Numpy-discussion] matrix problem: float to matrix power

2007-11-01 Thread Alan G Isaac
On Wed, 31 Oct 2007, Timothy Hochberg apparently wrote: > because M**n results in the matrix power of n. It would be > confusing if n**M did a broadcast element wise power. In an attempt to summarize: scalar to a matrix power 1. may have been overlooked, or may have been omitted as confusing

Re: [Numpy-discussion] matrix problem: float to matrix power

2007-10-31 Thread Robert Kern
Charles R Harris wrote: > On 10/31/07, Robert Kern <[EMAIL PROTECTED]> wrote: >> Charles R Harris wrote: >>> On 10/31/07, Alan G Isaac <[EMAIL PROTECTED]> wrote: >>> 1.0**numpy.array([1,2,3]) array([ 1., 1., 1.]) >>> 1.0**numpy.mat([1,2,3]) Traceback (most recent call last): >>>

Re: [Numpy-discussion] matrix problem: float to matrix power

2007-10-31 Thread Charles R Harris
On 10/31/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Charles R Harris wrote: > > On 10/31/07, Alan G Isaac <[EMAIL PROTECTED]> wrote: > > 1.0**numpy.array([1,2,3]) > >> array([ 1., 1., 1.]) > > 1.0**numpy.mat([1,2,3]) > >> Traceback (most recent call last): > >> File "", line 1, in >

Re: [Numpy-discussion] matrix problem: float to matrix power

2007-10-31 Thread Robert Kern
Charles R Harris wrote: > On 10/31/07, Alan G Isaac <[EMAIL PROTECTED]> wrote: > 1.0**numpy.array([1,2,3]) >> array([ 1., 1., 1.]) > 1.0**numpy.mat([1,2,3]) >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: unsupported operand type(s) for ** or pow(): 'float' a

Re: [Numpy-discussion] matrix problem: float to matrix power

2007-10-31 Thread Timothy Hochberg
On Oct 30, 2007 11:40 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > >>> 1.0**numpy.array([1,2,3]) > array([ 1., 1., 1.]) > >>> 1.0**numpy.mat([1,2,3]) > Traceback (most recent call last): > File "", line 1, in > TypeError: unsupported operand type(s) for ** or pow(): 'float' and 'matrix' > > W

Re: [Numpy-discussion] matrix problem: float to matrix power

2007-10-30 Thread Charles R Harris
On 10/31/07, Alan G Isaac <[EMAIL PROTECTED]> wrote: > >>> 1.0**numpy.array([1,2,3]) > array([ 1., 1., 1.]) > >>> 1.0**numpy.mat([1,2,3]) > Traceback (most recent call last): > File "", line 1, in > TypeError: unsupported operand type(s) for ** or pow(): 'float' and 'matrix' > > Why the restri

[Numpy-discussion] matrix problem: float to matrix power

2007-10-30 Thread Alan G Isaac
>>> 1.0**numpy.array([1,2,3]) array([ 1., 1., 1.]) >>> 1.0**numpy.mat([1,2,3]) Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for ** or pow(): 'float' and 'matrix' Why the restriction for matrices? Same question for matrices conformable for broa