Hi all. I have a function in which I create an array but the type of the array is selected by the user meaning that it is passed as an argument something like:
function f(T)
arr = Matrix{T}(undef,3,3)
return arr
end
What is a correct type-stable way to do this? This is basically the function to load a bunch of data into named tuples with prespecified (I cannot use DataFrames).
Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster here on Discourse so they can follow this thread.
(Original message ) (More Info)