Returns one(1) if positive negative one(-1) if negative. More...

array sign (const array &x)
 

Detailed Description

Returns one(1) if positive negative one(-1) if negative.

This function will return an array where the values of the elements that are positive will be one(1), elements that are negative will be negative one(-1) and zero(0) if the number is zero(0).

Function Documentation

array af::sign ( const array &  x)