BUG: Ensure that input is numpy array