Parent Directory
|
Revision Log
|
Patch
revision 328 by gross, Mon Dec 5 07:01:00 2005 UTC | revision 329 by gross, Wed Dec 7 04:42:43 2005 UTC | |
---|---|---|
# | Line 2587 def sign(arg): | Line 2587 def sign(arg): |
2587 | @raises TypeError: if the type of the argument is not expected. | @raises TypeError: if the type of the argument is not expected. |
2588 | """ | """ |
2589 | if isinstance(arg,numarray.NumArray): | if isinstance(arg,numarray.NumArray): |
2590 | return numarray.sign(arg) | return wherePositive(arg)-whereNegative(arg) |
2591 | elif isinstance(arg,escript.Data): | elif isinstance(arg,escript.Data): |
2592 | return arg._sign() | return arg._sign() |
2593 | elif isinstance(arg,float): | elif isinstance(arg,float): |
|
ViewVC Help | |
Powered by ViewVC 1.1.26 |