It's possible this approach would provide a marginal speed boost to __call__: perform the spline evaluation values broadcast with a reshape operation, and save the reshape argument which does not change.
In init:
self.interval_workspace_broadcast_shape = (-1,) + (1,)*self.xdim
in second argument to np.add of compute_basis_coefficient_selector:
replace:
self.interval_workspace[i][(slice(0,num_points),) + (None,)*self.xdim],
with:
self.interval_workspace[i, :num_points].reshape(self.interval_workspace_broadcast_shape),
It's possible this approach would provide a marginal speed boost to
__call__: perform the spline evaluation values broadcast with a reshape operation, and save the reshape argument which does not change.In init:
self.interval_workspace_broadcast_shape = (-1,) + (1,)*self.xdimin second argument to np.add of compute_basis_coefficient_selector:
replace:
self.interval_workspace[i][(slice(0,num_points),) + (None,)*self.xdim],with:
self.interval_workspace[i, :num_points].reshape(self.interval_workspace_broadcast_shape),