fixed bug related to weight array creation. np.zeros is better then np.empty due to the occasional nan value in a np.empty array causing occasional division errors.