Fixed se_periodic.py's K method to return the right shape.