I doubt you could use numpy to compute this efficiently, since (afaik) numpy only gives you a big speedup on very regular vector/​matrix type computations, which this is not.
I doubt you could use numpy to compute this efficiently, since (afaik) numpy only gives you a big speedup on very regular vector/​matrix type computations, which this is not.