Add comments and ensure numpy.array for params.