PEP8/flake8 fixes in tensor/basic.py

Remaining errors are lines too long in comments or C code.
That's actually what is breaking the tests.
I'll import them directly in tensor, rather than tensor.basic, I guess.