use numpy.multiply to multiply scalar and array
minor amendments