Solved by KFrank in post #2 
              
              
                Hi Alpha! 

I doubt that your nested-loop version scales worse that det().  Your 
version scales in time as n**2 (just count the number of times through 
the loop), while det() scales as n**3.  Of course for moderate values 
of n your python-loop version is indeed likely to be much slower than 
det(…