Christopher Barker wrote:
Dag Sverre Seljebotn wrote:
This is readily done -- there is no computational portion except for
what is in NumPy/Scipy or scikits, and I intend for it to remain that
way. It's just another interface, really.
(What kind of computations were you thinking about?)
On Tue, Dec 22, 2009 at 1:06 AM, Dag Sverre Seljebotn
da...@student.matnat.uio.no wrote:
OK. As a digression, I think it is easy to get the wrong impression of
Sage that it is for symbolics vs. computations. The reality is that
the symbolics has been one of the *weaker* aspects of Sage (though
2009/12/21 David Goldsmith d.l.goldsm...@gmail.com:
On Mon, Dec 21, 2009 at 9:57 AM, Christopher Barker
chris.bar...@noaa.gov wrote:
Dag Sverre Seljebotn wrote:
I recently got motivated to get better linear algebra for Python;
wonderful!
To me that seems like the ideal way to split up code
Dag Sverre Seljebotn wrote:
I recently got motivated to get better linear algebra for Python;
wonderful!
To me that seems like the ideal way to split up code -- let NumPy/SciPy
deal with the array-oriented world and Sage the closer-to-mathematics
notation.
well, maybe -- but there is a
On Mon, Dec 21, 2009 at 9:57 AM, Christopher Barker
chris.bar...@noaa.gov wrote:
Dag Sverre Seljebotn wrote:
I recently got motivated to get better linear algebra for Python;
wonderful!
To me that seems like the ideal way to split up code -- let NumPy/SciPy
deal with the array-oriented
Christopher Barker wrote:
Dag Sverre Seljebotn wrote:
I recently got motivated to get better linear algebra for Python;
wonderful!
To me that seems like the ideal way to split up code -- let NumPy/SciPy
deal with the array-oriented world and Sage the closer-to-mathematics
notation.
Christopher Barker wrote:
Dag Sverre Seljebotn wrote:
I recently got motivated to get better linear algebra for Python;
wonderful!
To me that seems like the ideal way to split up code -- let NumPy/SciPy
deal with the array-oriented world and Sage the closer-to-mathematics
notation.
On Mon, Dec 21, 2009 at 1:31 PM, Dag Sverre Seljebotn
da...@student.matnat.uio.no wrote:
Yes, I'm going my own way with it -- the SciPy matrix discussion tends
to focus on cosmetics IMO, and I just tend to fundamentally disagree
with the direction these discussions take on the SciPy/NumPy
Dag Sverre Seljebotn wrote:
This is readily done -- there is no computational portion except for
what is in NumPy/Scipy or scikits, and I intend for it to remain that
way. It's just another interface, really.
(What kind of computations were you thinking about?)
Nothing in particular --
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
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
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()
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
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
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
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
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
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
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
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
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
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
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
Is it possible to calculate a dot product in numpy by either notation
(a ^ b, where ^ is a possible notation) or calling a dot function
(dot(a,b)? I'm trying to use a column matrix for both vectors.
Perhaps, I need to somehow change them to arrays?
--
Wayne Watson (Watson
On Fri, Dec 18, 2009 at 1:51 PM, Wayne Watson
sierra_mtnv...@sbcglobal.net wrote:
Is it possible to calculate a dot product in numpy by either notation
(a ^ b, where ^ is a possible notation) or calling a dot function
(dot(a,b)? I'm trying to use a column matrix for both vectors.
Perhaps, I
That should do it. Thanks. How do I get the scalar result by itself?
Keith Goodman wrote:
On Fri, Dec 18, 2009 at 1:51 PM, Wayne Watson
sierra_mtnv...@sbcglobal.net wrote:
Is it possible to calculate a dot product in numpy by either notation
(a ^ b, where ^ is a possible notation) or
On Fri, Dec 18, 2009 at 2:51 PM, Wayne Watson
sierra_mtnv...@sbcglobal.net wrote:
That should do it. Thanks. How do I get the scalar result by itself?
np.dot(x.T,x)[0,0]
14
or
x = np.array([1,2,3])
np.dot(x,x)
14
___
NumPy-Discussion mailing
Very good.
Is there a scalar product in numpy?
Keith Goodman wrote:
On Fri, Dec 18, 2009 at 2:51 PM, Wayne Watson
sierra_mtnv...@sbcglobal.net wrote:
That should do it. Thanks. How do I get the scalar result by itself?
np.dot(x.T,x)[0,0]
14
or
x =
On Fri, Dec 18, 2009 at 3:22 PM, Wayne Watson
sierra_mtnv...@sbcglobal.net wrote:
Is there a scalar product in numpy?
Isn't that the same thing as a dot product? np.dot doesn't do what you want?
___
NumPy-Discussion mailing list
Well, they aren't quite the same. If a is the length of A, and b is the
length of B, then a*b = A dot B* cos (theta). I'm still not familiar
enough with numpy or math to know if there's some function that will
produce a from A. It's easy enough to do, a = A(0)**2 + ..., but I would
like to
On Fri, Dec 18, 2009 at 3:40 PM, Wayne Watson
sierra_mtnv...@sbcglobal.net wrote:
Well, they aren't quite the same. If a is the length of A, and b is the
length of B, then a*b = A dot B* cos (theta). I'm still not familiar
enough with numpy or math to know if there's some function that will
Not quite. The point of the scalar product is to produce theta. My
intended use is that found in calculus. Nevertheless, my question is how
to produce the result in some set of functions that are close to
minimal. I could finish this off by using the common definition found in
a calculus book
On 12/18/2009 5:54 PM, Keith Goodman wrote:
On Fri, Dec 18, 2009 at 2:51 PM, Wayne Watson
sierra_mtnv...@sbcglobal.net wrote:
That should do it. Thanks. How do I get the scalar result by itself?
np.dot(x.T,x)[0,0]
14
or
x = np.array([1,2,3])
np.dot(x,x)
14
or
On 12/18/2009 7:12 PM, Wayne Watson wrote:
The point of the scalar product is to produce theta.
As David said, that is just NumPy's `dot`.
a = np.array([0,2])
b = np.array([5,0])
theta = np.arccos(np.dot(a,b)/np.sqrt(np.dot(a,a)*np.dot(b,b)))
theta
1.5707963267948966
theta/np.pi
0.5
hth,
Nicely done.
Alan G Isaac wrote:
On 12/18/2009 7:12 PM, Wayne Watson wrote:
The point of the scalar product is to produce theta.
As David said, that is just NumPy's `dot`.
a = np.array([0,2])
b = np.array([5,0])
theta = np.arccos(np.dot(a,b)/np.sqrt(np.dot(a,a)*np.dot(b,b)))
I'll amend that. I should have said, Dot's all folks. -- Bugs Bunny
--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
(121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz Site: 39° 15' 7 N, 121° 2' 32 W, 2700 feet
np.dot(x.flat, x.flat) _is exactly_ sum of squares(x.flat). Your
math education appears to have drawn a distinction between dot
product and scalar product, that, when one is talking about
Euclidean vectors, just isn't there: in that context, they are one and
the same thing.
DG
On Fri, Dec 18,
37 matches
Mail list logo