aeneng wrote:
> WHAT IS WRONG WITH MY CODE?
> def cross(u,v)
Missing colon.
hth,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 29, 11:45 pm, hdante <[EMAIL PROTECTED]> wrote:
> On Mar 28, 10:47 pm, "aeneng" <[EMAIL PROTECTED]> wrote:
>
> > Hello everyone,
>
> Hi,
>
> Always avoid reinventing the wheel:
>
> from Numeric import array, cross_product
> a = array([1, 2, 3])
> b = array([4, 5, 6])
> print cross_product(
On Mar 28, 10:47 pm, "aeneng" <[EMAIL PROTECTED]> wrote:
> Hello everyone,
Hi,
Always avoid reinventing the wheel:
from Numeric import array, cross_product
a = array([1, 2, 3])
b = array([4, 5, 6])
print cross_product(a, b)
See:
http://numpy.scipy.org/
http://www.scipy.org/
(hint: consid
"aeneng" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| def cross(u,v)
|"""input two vectors u and v in 3-D space,
| output a cross product of vector w, in column or in row
| accordingly."""
|ppp1,ppp2,ppp3=0.0,0.0,0.0
To add to other comments, remove above which is
On Mar 29, 4:18 am, Roel Schroeven <[EMAIL PROTECTED]>
wrote:
> aeneng schreef:
>
>
>
>
>
> > Hello everyone,
>
> > I am just starting to use python in numerical cacluation.
> > I need you to help me to see what's wrong with the following piece of
> > codes, which computes the cross product of two
aeneng schreef:
> Hello everyone,
>
> I am just starting to use python in numerical cacluation.
> I need you to help me to see what's wrong with the following piece of
> codes, which computes the cross product of two vectors and returns
> the result. u and v are two 3x1 matrix.
>
> when I impo
On Mar 29, 12:47 pm, "aeneng" <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I am just starting to use python in numerical cacluation.
> I need you to help me to see what's wrong with the following piece of
> codes, which computes the cross product of two vectors and returns
> the result. u and v
Oh, I forgot to mention...
On Sat, 29 Mar 2008 01:47:21 +, aeneng wrote:
> if __name__=="__main__":
...
> print "file name is %s" %__name__
This doesn't do what you expect it to do. You've already established that
__name__ is equal to "__main__", so you might as well change that line
"aeneng" <[EMAIL PROTECTED]> writes:
> I am just starting to use python in numerical cacluation.
Welcome, and congratulations on learning Python.
> I need you to help me to see what's wrong with the following piece
> of codes [...]
Your code is rather difficult to read, since your expressions
On Sat, 29 Mar 2008 01:47:21 +, aeneng wrote:
> Hello everyone,
>
> I am just starting to use python in numerical cacluation. I need you to
> help me to see what's wrong with the following piece of codes, which
> computes the cross product of two vectors and returns the result. u and
> v are
No problem...
your def needs a colon..
def function(params):
yours lacks it =) thats all
On Fri, Mar 28, 2008 at 8:47 PM, aeneng <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I am just starting to use python in numerical cacluation.
> I need you to help me to see what's wrong with the follo
Hello everyone,
I am just starting to use python in numerical cacluation.
I need you to help me to see what's wrong with the following piece of
codes, which computes the cross product of two vectors and returns
the result. u and v are two 3x1 matrix.
when I import the function, error message s
12 matches
Mail list logo