Also the `if not squared` test seems to be applied twice for this case: once inside the cython code and once outside, in this python function (unless I misread the code). If the bug is confirmed it means that a new test is required :)