Changed norm calculation for numpy 1.6 compatibility.