Fixed in commit d1d221be1f6abd62f61a3778dccd0415a491cd5c where possible. Is it okay to use  numpy.linalg.norm? It seems that scipy.linalg.norm does not provide the axis parameter that I need.