Raise error for non-ndarray output as well