On Tue, Feb 27, 2018 at 9:02 AM, Seb wrote:
> That's right. I just tried this manipulation by replacing the last
> block of code in my example, from the line above `for` loop with:
>
> ------
> # Alternative using `np.matmul`
>
On Tue, 27 Feb 2018 07:36:31 -0700,
Ian Kelly wrote:
> On Tue, Feb 27, 2018 at 4:08 AM, Peter Otten <__pete...@web.de> wrote:
>> Seb wrote:
>>> On Tue, 27 Feb 2018 12:25:30 +1300,
>>> Gregory Ewing wrote:
Seb wrote:
> I was wondering is whether there's a faster way of multiplying
On Tue, Feb 27, 2018 at 4:08 AM, Peter Otten <__pete...@web.de> wrote:
> Seb wrote:
>
>> On Tue, 27 Feb 2018 12:25:30 +1300,
>> Gregory Ewing wrote:
>>
>>> Seb wrote:
I was wondering is whether there's a faster way of multiplying each
row (1x3) of a matrix by another matrix (3x3), compar
Seb wrote:
> On Tue, 27 Feb 2018 12:25:30 +1300,
> Gregory Ewing wrote:
>
>> Seb wrote:
>>> I was wondering is whether there's a faster way of multiplying each
>>> row (1x3) of a matrix by another matrix (3x3), compared to looping
>>> through the matrix row by row as shown in the code.
>
>> Jus
On Tue, 27 Feb 2018 12:25:30 +1300,
Gregory Ewing wrote:
> Seb wrote:
>> I was wondering is whether there's a faster way of multiplying each
>> row (1x3) of a matrix by another matrix (3x3), compared to looping
>> through the matrix row by row as shown in the code.
> Just multiply the two matric
Seb wrote:
I was wondering is whether there's a faster way of
multiplying each row (1x3) of a matrix by another matrix (3x3), compared
to looping through the matrix row by row as shown in the code.
Just multiply the two matrices together.
If A is an nx3 matrix and B is a 3x3 matrix, then
C = A
On Mon, Feb 26, 2018 at 3:12 PM, Dan Stromberg wrote:
> On Mon, Feb 26, 2018 at 2:07 PM, Ian Kelly wrote:
>> Taking LMGTFY to a whole new level of rudeness by obviously not even
>> bothering to read the entire paragraph before responding.
>
> Is LMGTFY rude? I think maybe it was back when it sai
On Mon, Feb 26, 2018 at 2:07 PM, Ian Kelly wrote:
> On Mon, Feb 26, 2018 at 2:40 PM, Dan Stromberg wrote:
>> On Mon, Feb 26, 2018 at 8:53 AM, Seb wrote:
>>> On Sun, 25 Feb 2018 18:52:14 -0500,
>>> Terry Reedy wrote:
>>>
>>> [...]
>>>
numpy has a matrix multiply function and now the '@' mat
On Mon, Feb 26, 2018 at 2:40 PM, Dan Stromberg wrote:
> On Mon, Feb 26, 2018 at 8:53 AM, Seb wrote:
>> On Sun, 25 Feb 2018 18:52:14 -0500,
>> Terry Reedy wrote:
>>
>> [...]
>>
>>> numpy has a matrix multiply function and now the '@' matrix multiply
>>> operator.
>>
>> Yes, but what I was wonderi
On Mon, Feb 26, 2018 at 8:53 AM, Seb wrote:
> On Sun, 25 Feb 2018 18:52:14 -0500,
> Terry Reedy wrote:
>
> [...]
>
>> numpy has a matrix multiply function and now the '@' matrix multiply
>> operator.
>
> Yes, but what I was wondering is whether there's a faster way of
> multiplying each row (1x3)
On Mon, Feb 26, 2018 at 9:53 AM, Seb wrote:
> On Sun, 25 Feb 2018 18:52:14 -0500,
> Terry Reedy wrote:
>
> [...]
>
>> numpy has a matrix multiply function and now the '@' matrix multiply
>> operator.
>
> Yes, but what I was wondering is whether there's a faster way of
> multiplying each row (1x3)
On Sun, 25 Feb 2018 18:52:14 -0500,
Terry Reedy wrote:
[...]
> numpy has a matrix multiply function and now the '@' matrix multiply
> operator.
Yes, but what I was wondering is whether there's a faster way of
multiplying each row (1x3) of a matrix by another matrix (3x3), compared
to looping th
On 2/25/2018 12:45 PM, Seb wrote:
Hello,
The following is an example of an Nx3 matrix (`uvw`) representing N
vectors that need to be multiplied by a 3x3 matrix (generated by
`randint_mat` function) and store the result in `uvw_rots`:
---
On Tue, Jan 4, 2011 at 11:31 PM, Tim Roberts wrote:
> Zdenko wrote:
>>
>>Please, can anybody write me a simple recursive matrix multiplication
>>using multiple threads in Python, or at least show me some guidelines
>>how to write it myself
>
> Matrix multiplication is not generally done recursive
Zdenko wrote:
>
>Please, can anybody write me a simple recursive matrix multiplication
>using multiple threads in Python, or at least show me some guidelines
>how to write it myself
Matrix multiplication is not generally done recursively. There's no
conceptual gain. It makes more sense iterat
On 1/4/2011 2:15 AM, Ulrich Eckhardt wrote:
Zdenko wrote:
Please, can anybody write me a simple recursive matrix multiplication
using multiple threads in Python, or at least show me some guidelines
how to write it myself
No problem, I just need your bank account data to withdraw the payment an
On Tue, 04 Jan 2011 13:22:33 +0100, Zdenko wrote:
> I wrote these two codes for example:
>
> this one is naive way of matrix multiplication using one thread
[...]
> this one is using two threads, each one is multiplying half of matrix
[...]
> why is second one more than twice slower than first wh
On Tue, Jan 4, 2011 at 4:22 AM, Zdenko wrote:
> On 4.1.2011 11:15, Ulrich Eckhardt wrote:
>>
>> Zdenko wrote:
>>>
>>> Please, can anybody write me a simple recursive matrix multiplication
>>> using multiple threads in Python, or at least show me some guidelines
>>> how to write it myself
>>
>> No
See section titled: "'array' or 'matrix'? Which should I use?"
at
http://www.scipy.org/NumPy_for_Matlab_Users
BTW
http://www.python.org/dev/peps/pep-0211/
--
http://mail.python.org/mailman/listinfo/python-list
BTW
http://www.python.org/dev/peps/pep-0211/
--
http://mail.python.org/mailman/listinfo/python-list
I would be very suprised if you achieve faster results threading this
problem. There's been much discussed on benefits or lack thereof to
threading in Python (or in general).
Threading is best used in situations where you are doing different
kinds of tasks. For example if you want to do your matri
On 4.1.2011 11:15, Ulrich Eckhardt wrote:
Zdenko wrote:
Please, can anybody write me a simple recursive matrix multiplication
using multiple threads in Python, or at least show me some guidelines
how to write it myself
No problem, I just need your bank account data to withdraw the payment and
On 4 jan, 11:15, Ulrich Eckhardt
wrote:
> Zdenko wrote:
> > Please, can anybody write me a simple recursive matrix multiplication
> > using multiple threads in Python, or at least show me some guidelines
> > how to write it myself
>
> No problem, I just need your bank account data to withdraw the
Zdenko wrote:
> Please, can anybody write me a simple recursive matrix multiplication
> using multiple threads in Python, or at least show me some guidelines
> how to write it myself
No problem, I just need your bank account data to withdraw the payment and
the address of your teacher whom to send
sturlamolden wrote:
> That's what I wrote: "NumPy has a matrix type." It is called called
> numpy.matrix.
>
> I did not suggest using the array type numpy.array.
>
> Reading carefully is indeed important...
I know what you wrote and you are strictly correct. I was just clarifying it
for a reade
On Jun 18, 11:20 am, Jeremy Sanders wrote:
> > NumPy has a matrix type that overloads the * operator.
> Just a tiny followup, which may be important unless you carefully read the
> documentation. The "*" operator doesn't do matrix multiplication for normal
> numpy arrays
That's what I wrote: "
[EMAIL PROTECTED] wrote:
> Hi,
>
> Is there any direct function for matrix multiplication in Python or
> any of its packages? or do we have to multiply element by element?
If you want a pure Python module for 4x4 matrices, then you may want to
look at Game Objects
http://code.google.com/p/gameo
sturlamolden wrote:
> Use numpy: www.scipy.org
>
> NumPy has a matrix type that overloads the * operator.
Just a tiny followup, which may be important unless you carefully read the
documentation. The "*" operator doesn't do matrix multiplication for normal
numpy arrays - you do need to use its s
On Jun 17, 10:52 pm, "[EMAIL PROTECTED]" wrote:
> Hi,
>
> Is there any direct function for matrix multiplication in Python or
> any of its packages? or do we have to multiply element by element?
Use numpy: www.scipy.org
NumPy has a matrix type that overloads the * operator.
--
http://mail.py
[EMAIL PROTECTED]:
> Is there any direct function for matrix multiplication in Python or
> any of its packages? or do we have to multiply element by element?
First hit on google for "python matrix":
http://matpy.sourceforge.net/
--
Thomas Wittek
http://gedankenkonstrukt.de/
Jabber: [EMAIL PROTEC
Roberto Bonvallet wrote:
> Sssasss wrote:
> > hi evrybody!
> >
> > I wan't to multiply two square matrixes, and i don't understand why it
> > doesn't work.
> > Could you explain me?
> >
> > def multmat(A,B):
> >"A*B"
> >if len(A)!=len(B): return "error"
>
> Wrong validation here: you _can
David wrote:
> Il 18 Oct 2006 04:17:29 -0700, Sssasss ha scritto:
>
> > hi evrybody!
> >
> > I wan't to multiply two square matrixes, and i don't understand why it
> > doesn't work.
> Can I suggest a little bit less cumbersome algorithm?
>
> def multmat2(A,B):
> "A*B"
> if len(A)!=len(B):
Sssasss wrote:
> hi evrybody!
>
> I wan't to multiply two square matrixes, and i don't understand why it
> doesn't work.
> Could you explain me?
>
> def multmat(A,B):
>"A*B"
>if len(A)!=len(B): return "error"
Wrong validation here: you _can_ multiply two matrices with a different
number
Il 18 Oct 2006 04:17:29 -0700, Sssasss ha scritto:
> hi evrybody!
>
> I wan't to multiply two square matrixes, and i don't understand why it
> doesn't work.
Can I suggest a little bit less cumbersome algorithm?
def multmat2(A,B):
"A*B"
if len(A)!=len(B): return "error" # this check is
On 2006-10-18 14:15:17 +0200, Sssasss wrote:
> Fredrik Lundh wrote:
> > "Sssasss" wrote:
> >
> > > I wan't to multiply two square matrixes, and i don't understand why it
> > > doesn't work.
> > >
> > > def multmat(A,B):
> > >"A*B"
> > >if len(A)!=len(B): return "error"
> > >D=[]
> > >
Fredrik Lundh wrote:
> "Sssasss" wrote:
>
> > I wan't to multiply two square matrixes, and i don't understand why it
> > doesn't work.
> >
> > def multmat(A,B):
> >"A*B"
> >if len(A)!=len(B): return "error"
> >D=[]
> >C=[]
> >for i in range(len(A)): D.append(0)
> >for i in
"Sssasss" wrote:
> I wan't to multiply two square matrixes, and i don't understand why it
> doesn't work.
>
> def multmat(A,B):
>"A*B"
>if len(A)!=len(B): return "error"
>D=[]
>C=[]
>for i in range(len(A)): D.append(0)
>for i in range(len(A)): C.append(D)
append doesn't co
37 matches
Mail list logo