Fix bug (can't treat np arrays as lists when 'if arr' statement