Okay, I wrote a little script [1] to scan Python source files look for things like 'dot(a, dot(b, c))' or 'dot(dot(a, b), c)', or the ndarray.dot method equivalents. So what we get out is:
- a count of how many 'dot' calls there are- a count of how often we see left-associative nestings: dot(dot(a, b), c)- a count of how often we see right-associative nestings: dot(a, dot(b, c))
Running it on a bunch of projects, I get:
| project | dots | left | right | right/left |
|--------------+------+------+-------+------------|
| scipy | 796 | 53 | 27 | 0.51 |
| nipy | 275 | 3 | 19 | 6.33 |
| scikit-learn | 472 | 11 | 10 | 0.91 |
| statsmodels | 803 | 46 | 38 | 0.83 |
| astropy | 17 | 0 | 0 | nan |
| scikit-image | 15 | 1 | 0 | 0.00 |
|--------------+------+------+-------+------------|
| total | 2378 | 114 | 94 | 0.82 |