Ah, I see - so in cases where one parameter is an array, should all of them be arrays? If not, and it's possible for some to be scalars and some arrays, then you can't just assume the first is going to give you the dimension - you would need to loop through all the parameters to check that all those that *are* arrays/lists have the same dimension and save that as the dimension.