[MATRIX-SIG] -3**(-1/3.), sgn()
Jean-Bernard ADDOR
jbaddor@phy.ulaval.ca
Thu, 24 Jul 1997 10:30:03 -0400 (EDT)
Hy !
a is an array with positive, negatives or null values
I want to compute a**(-1/3.). It works perfectly if (a) is not an array
but a scalar (function pow). The funcion power do not give fractional
power from negative number.
I would like to write sgn(a)*abs(a)**(-1/3.) but the sgn function seems
not to be defined in python (perhaps because it is not in c, but it is in
fortran). I can use greater_equal. Do you have a better solution ?
A bientot,
Jean-Bernard
_______________
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________