fixed issue with a too old numpy version (<1.8), where the axis parameter is not available. Solved it by using faster implementation of l2norm along axis 1 (einsum solution).