Check if input is negative. More...

Functions

AFAPI array sign (const array &in)
 C++ Interface for getting the sign of input. More...
 

Detailed Description

Check if input is negative.

Note
This function supports real inputs only. Complex inputs are not yet supported.

Function Documentation

AFAPI array af::sign ( const array in)

C++ Interface for getting the sign of input.

Parameters
[in]inis input array
Returns
the sign of each element of input
Note
output is 1 for negative numbers and 0 for positive numbers
Examples:
graphics/plot2d.cpp.