sigmoid function of a vector