add tests for normalize and magnitude against numpy
fixed magnitude for x^2 not x^x etc.