It was the numpy.eig and numpy.inv which was draining power.
This speeds up model NS R1rho 2site, by a factor 4X:
BEFORE:
Single:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 32.552 32.552 <string>:1(<module>)
1 0.002 0.002 32.552 32.552 pf_nsr1rho2site:530(single)
Cluster:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 33.307 33.307 <string>:1(<module>)
1 0.008 0.008 33.307 33.307 pf_nsr1rho2site:554(cluster)
AFTER:
Single:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 8.286 8.286 <string>:1(<module>)
1 0.002 0.002 8.286 8.286 pf_nsr1rho2site:530(single)
Cluster:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 8.223 8.223 <string>:1(<module>)
1 0.007 0.007 8.223 8.223 pf_nsr1rho2site:554(cluster)
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.