cleaned up python array verification