Here is the initial profiling report. Note that the major bottleneck here is the 2.3 million calls to numpy.put(). 82% of the total time was consumed doing this operation, which occurs in SiteCollection.expand() (see https://github.com/gem/nhlib/blob/1ce300b8002a540c8cf7b76ef5714715aa4c90a5/nhlib/site.py#L282).
Here is the initial profiling report. Note that the major bottleneck here is the 2.3 million calls to numpy.put(). 82% of the total time was consumed doing this operation, which occurs in SiteCollection. expand( ) (see https:/ /github. com/gem/ nhlib/blob/ 1ce300b8002a540 c8cf7b76ef57147 15aa4c90a5/ nhlib/site. py#L282).