- Code: Select all
int dimensions[] = {2, 4, 3};
array dimensions = array(1, 3, dimensions);
array new_array = zeros(...);
Problem is I'd like this to work for arbitrary dimensions (from 1 to 4), so I don't want to access the elements of dimensions directly. Is there a way to convert an array object into a dim4 object so that it works with zeros()?