Replace numpy scalar values with numpy data types with their Python equivalents (e.g. replace np.int64(1) with int(1)) -- weave otherwise treats them as general Python objects, not as numbers