When trying to add sample weights (parameter "weight" in mgcv::gam), we get the following error :
NotImplementedError: Conversion ‘py2rpy’ not defined for objects of type ‘<class ‘numpy.ndarrray’>’.
and this regardless of the form of the argument “weight” (string, numpy or pandas).