Daniel Schüle wrote:
[...]
Derive your own subclass of complex and define those methods.
I think something as basic as an angle/arg of complex number
definetly belongs to the interface, and it would not even require a
great effort to put it there
shrug Okay. Write a patch. Personally,
[...]
shrug Okay. Write a patch. Personally, I would prefer that it be a
function in cmath rather than a method because then it could be made to
work on integers and regular floats, too.
Ok, but what semantic should angle/arg have, say for 3 respectively
for 3.0?
the same as for arg(3+0j)?
Daniel Schüle wrote:
shrug Okay. Write a patch. Personally, I would prefer that it be a
function in cmath rather than a method because then it could be made
to work on integers and regular floats, too.
Ok, but what semantic should angle/arg have, say for 3 respectively
for 3.0?
the same
On Sat, 06 Aug 2005 06:44:03 GMT, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Fri, 05 Aug 2005 18:24:26 +0200, Daniel Schüle
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
c = 1+1j
c.arg(angle_mode = cmath.GRAD) - 45.0
Is that right? The result looks more like
Hello all,
I often have to deal with complex numbers
using python iteractive as calculator
I wonder why there are no methods like arg, abs
well one can use
c = 1+1j
abs(c)
In my opinion it would also be nice to have the
possibility to write it as
c.abs()
it looks more OO
unfortunately there
I would also like to see some more functions to make
calculations with complex number more convenient
e.g.
c = 27
c = 27+0j
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Schüle [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I wonder why there are no methods like arg, abs
well one can use
c = 1+1j
abs(c)
In my opinion it would also be nice to have the
possibility to write it as
c.abs()
it looks more OO
Python is object based but not
On Fri, 05 Aug 2005 15:42:41 +0200,
Daniel Schüle [EMAIL PROTECTED] wrote:
Hello all,
I often have to deal with complex numbers
using python iteractive as calculator
I wonder why there are no methods like arg, abs
well one can use
c = 1+1j
abs(c)
In my opinion it would also be nice to
Terry Reedy wrote:
Daniel Schüle [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
...
unfortunately there is no arg method to get the angle
of the complex number
I agree that this is a deficiency. I would think .angle() should be a
no-param method like .conjugate(), though its
Hi Terry,
In my opinion it would also be nice to have the
possibility to write it as
c.abs()
it looks more OO
Python is object based but not rigidly OO in syntax or looks. This
is an
intentional design decision. Not being gratuitiously redundant is
another.
I agree, redundancy
c = 1+1j
c.arg(angle_mode = cmath.GRAD) - 45.0
Is that right? The result looks more like Degrees...
maybe I confuse, in german one would say 45 Grad
I took a freedom to translate it directly :)
well, my calculator shows a D
which most likely stands for Degree, I cannot tell for sure
Daniel Schüle wrote:
what do you think about it?
maybe there exists some proposals aiming this goal?
Derive your own subclass of complex and define those methods.
--
Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/
San Jose, CA, USA 37 20 N 121 53 W AIM erikmaxfrancis
I
Daniel Schüle wrote:
maybe I confuse, in german one would say 45 Grad
I took a freedom to translate it directly :)
well, my calculator shows a D
which most likely stands for Degree, I cannot tell for sure
Probably. In English, you have degrees and gradians, which aren't the
same thing;
Erik Max Francis wrote:
Daniel Schüle wrote:
maybe I confuse, in german one would say 45 Grad
I took a freedom to translate it directly :)
well, my calculator shows a D
which most likely stands for Degree, I cannot tell for sure
Probably. In English, you have degrees and gradians, which
Daniel Schüle [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I agree that this is a deficiency. I would think .angle() should be a
I don't know what nomenclature is used in english speaking
mathematical world for angle of a complex number
I learned it in german as Arg(z) .. Arg
[...]
I am aware of the usage of argument to mean the angle in polar
representation, but I don't like it. The word argument already has two
other meanings, one in common English, the other in math/CS. The latter
meaning is the inputs to a function, and that is how the word is used in
16 matches
Mail list logo