Re: [Numpy-discussion] objects are not aligned. Matrix and Array

2009-12-19 Thread Chris Colbert
On Sat, Dec 19, 2009 at 6:43 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Fri, Dec 18, 2009 at 10:20 PM, Wayne Watson sierra_mtnv...@sbcglobal.net wrote: This program gives me the message following it: Program== import numpy as np from numpy import

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Wayne Watson
I'm trying to compute the angle between two vectors in three dimensional space. For that, I need to use the scalar (dot) product , according to a calculus book (quoting the book) I'm holding in my hands right now. I've used dot() successfully to produce the necessary angle. My program works

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Dag Sverre Seljebotn
Wayne Watson wrote: I'm trying to compute the angle between two vectors in three dimensional space. For that, I need to use the scalar (dot) product , according to a calculus book (quoting the book) I'm holding in my hands right now. I've used dot() successfully to produce the necessary

Re: [Numpy-discussion] objects are not aligned. Matrix and Array

2009-12-19 Thread Charles R Harris
On Sat, Dec 19, 2009 at 4:53 AM, Chris Colbert sccolb...@gmail.com wrote: On Sat, Dec 19, 2009 at 6:43 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Fri, Dec 18, 2009 at 10:20 PM, Wayne Watson sierra_mtnv...@sbcglobal.net wrote: This program gives me the message following

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Wayne Watson
Dag Sverre Seljebotn wrote: Wayne Watson wrote: I'm trying to compute the angle between two vectors in three dimensional space. For that, I need to use the scalar (dot) product , according to a calculus book (quoting the book) I'm holding in my hands right now. I've used dot()

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Alan G Isaac
On 12/19/2009 11:45 AM, Wayne Watson wrote: A 4x1, 1x7, and 1x5 would be examples of a 1D array or matrix, right? Are you saying that instead of using a rotational matrix ... that I should use a 2-D array for rotCW? So why does numpy have a matrix class? Is the class only used when working

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Charles R Harris
On Sat, Dec 19, 2009 at 9:45 AM, Wayne Watson sierra_mtnv...@sbcglobal.netwrote: Dag Sverre Seljebotn wrote: Wayne Watson wrote: I'm trying to compute the angle between two vectors in three dimensional space. For that, I need to use the scalar (dot) product , according to a calculus

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Wayne Watson
Yes, flat sounds useful here. However, numpy isn't bending over backwards to tie in conventional mathematical language into it. I don't recall flat in any calculus books. :-) Maybe I've been away so long from it, that it is a common math concept? Although I doubt that. Alan G Isaac wrote: On

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Charles R Harris
On Sat, Dec 19, 2009 at 10:38 AM, Wayne Watson sierra_mtnv...@sbcglobal.net wrote: Yes, flat sounds useful here. However, numpy isn't bending over backwards to tie in conventional mathematical language into it. I don't recall flat in any calculus books. :-) Maybe I've been away so long from

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Wayne Watson
OK, so what's your recommendation on the code I wrote? Use shape 0xN? Will that eliminate the need for T? I'll go back to Tenative Python, and re-read dimension, shape and the like. Charles R Harris wrote: On Sat, Dec 19, 2009 at 9:45 AM, Wayne Watson sierra_mtnv...@sbcglobal.net

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Wayne Watson
That's for sure! :-) Charles R Harris wrote: On Sat, Dec 19, 2009 at 10:38 AM, Wayne Watson sierra_mtnv...@sbcglobal.net mailto:sierra_mtnv...@sbcglobal.net wrote: Yes, flat sounds useful here. However, numpy isn't bending over backwards to tie in conventional mathematical

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Christopher Barker
Wayne Watson wrote: Yes, flat sounds useful here. However, numpy isn't bending over backwards to tie in conventional mathematical language into it. exactly -- it isn't bending over at all! (well a little -- see below). numpy was designed for general purpose computational needs, not any one

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Wayne Watson
I guess I'll become accustomed to it over time. I have some interesting things to do for which I will need the facilities of numpy. I realized where I got into trouble with some of this. I was not differentiating between the dimensionality of space and that of a matrix or array. I haven't had

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Charles R Harris
On Sat, Dec 19, 2009 at 11:50 AM, Wayne Watson sierra_mtnv...@sbcglobal.net wrote: I guess I'll become accustomed to it over time. I have some interesting things to do for which I will need the facilities of numpy. I realized where I got into trouble with some of this. I was not

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread Dag Sverre Seljebotn
Christopher Barker wrote: Wayne Watson wrote: Yes, flat sounds useful here. However, numpy isn't bending over backwards to tie in conventional mathematical language into it. exactly -- it isn't bending over at all! (well a little -- see below). numpy was designed for general

Re: [Numpy-discussion] dot function or dot notation, matrices, arrays?

2009-12-19 Thread David Goldsmith
I think the bottom line is: _only_ use the matrix class if _all_ you're doing is matrix algebra - which, as Chris Barker said, is (likely) the exception, not the rule, for most numpy users. I feel confident in saying this (that is, _only_ ... _all_) because if you feel you really must have a