Made unit conversion functions aware of numpy arrays.