BUG: Support array interface

This should fix #3390.
is this pep8 indentation?