ensure_array interface changed
merged with master