Broken bounds wrapping
Use of axis keyword in average. This needs numpy v1.7.