Fix multi_array size bug when initializing a buffer from iterators

A multi_array cannot have its size changed by assign method.