updated the sigmoid formula.

Not sure whether "ones" can be used numpy.  Would review later.