* `nP` --> `size`? * W --> weights? * mapPair? do we need it? Can we just duck type? * `deriv`/2 --> gradient? hessian? Not sure on this