Open RRiva opened 1 month ago
Never mind, assumed-rank cannot be used in derived types. An answer and comment list some alternatives, but I'm not too convinced. Supporting n inputs and m outputs requires n*m types, which will make the code very long and the binary unnecessarily heavy. Maybe a better solution is to generate the ranks needed by the user with Fypp. There is an example at stdlib_stats_moment_scalar.fypp.
Hi @jacobwilliams, thanks for the great work! I was wondering if it would be possible to support multi-dimensional outputs. For now, I think that the API requires to initialize a different interpolator per output, which is inefficient, since it requires to find the grid points multiple times.
One way to implement this would be to declare
f
as assumed-rank, and then place the interpolation algorithm insideselect rank
. Obviously, the linear interpolation formula stays the same, and to reduce code duplication you mightinclude
a file.What do you think about this?