Change array type in mutating function?

No, the type of a value can never be mutated in Julia, so there’s no way to mutate an Array{Int} into an Array{Float64}. The easiest way around this is to just not pass an Array{Int} into your function.

If you want a convenient way to operate on Int array inputs, you could consider making both a mutating and non-mutating version of the function:

function rotate!(r)
  r .= 1.5
end

function rotate(r)
  out = similar(r, promote_type(eltype(r), Float64))
  rotate!(out)
  out
end

This is a common pattern in Julia, where the non-mutating function is just a convenient wrapper to allocate some output, call the mutating version on that output, and then return the result.