I am running isympy within emacs shell (emacs 24, debian, snapshot)
I do not have much experience with Python!! The following is driving me nuts:
In [77]: k=0
In [78]: for i in range(3):
....: for j in range(3):
....: if i <= j:
....: for l in range(6):
....: J[k,l] = diff(Y[i,j], vars[l])
....: k = k+1
....: else:
....: pass
....: continue
....:
IndentationError: unindent does not match any outer indentation level
(I have tried MANY variations on this!)
I do believe the code is correct, but isympy do not think so!!
¿What is wrong?
The second
for-loop needs to be indented from the first, so instead ofhave
Also, the
doesn’t really do anything and could be deleted. It’s not clear that
continuedoes much here either.Another frequent culprit is an inadvertent mixture of blanks and tabs. PEP 8 – The Style Guide for Python recommends the use of blanks for indentation over tabs.