You're right that there is always at least one unnecessary allocation happening here, but since `float64()` doesn't make a copy if the input already has the right type, this will e.g. cause `X` to be overwritten if it is already a `Matrix{Float64}` but `y` is not.