Add DPF operator to extract the signs of the field as a new field
Opened this issue · 0 comments
JimmyHe0527 commented
Description of the feature
Add DPF operator to extract the signs of the field as a new field. The sign function is a common one, but it is not currently available in PyDPF. Doing x/abs(x) works most of the time except for when x=0.
Steps for implementing the feature
Implement the sign function:
sign(x) = 0 if x = 0, 1 if x > 0, and -1 if x < 0
as an operator to apply this to all entities in the input field, and return the results as a new field.
Useful links and references
No response