File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -698,6 +698,26 @@ def pow2(a):
698698 """
699699 return _arith_unary_func (a , backend .get ().af_pow2 )
700700
701+ def sigmoid (a ):
702+ """
703+ Raise 2 to the power of each element in input.
704+
705+ Parameters
706+ ----------
707+ a : af.Array
708+ Multi dimensional arrayfire array.
709+
710+ Returns
711+ --------
712+ out : af.Array
713+ array where each element is outout of a sigmoid function for the corresponding value from `a`.
714+
715+ Note
716+ -------
717+ `a` must not be complex.
718+ """
719+ return _arith_unary_func (a , backend .get ().af_sigmoid )
720+
701721def exp (a ):
702722 """
703723 Exponential of each element in the array.
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ def simple_arith(verbose = False):
173173 display_func (af .root (a , b ))
174174 display_func (af .pow (a , b ))
175175 display_func (af .pow2 (a ))
176+ display_func (af .sigmoid (a ))
176177 display_func (af .exp (a ))
177178 display_func (af .expm1 (a ))
178179 display_func (af .erf (a ))
You can’t perform that action at this time.
0 commit comments