series_sign()
Calculates the element-wise sign of the numeric series input.
Syntax
series_sign(
series)
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
series | dynamic |
✔️ | An array of numeric values over which the sign function is applied. |
Returns
A dynamic array of calculated sign function values. -1 for negative, 0 for 0, and 1 for positive. Any non-numeric element yields a null
element value.
Example
print arr = dynamic([-6, 0, 8])
| extend arr_sign = series_sign(arr)
Output
arr | arr_sign |
---|---|
[-6,0,8] | [-1,0,1] |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for