import torch


def uniform_distr(r,minv,maxv):
        """distributes r uniformly within (min, max), with jacobian dvariable"""
        minv=torch.ones_like(r)*minv
        maxv=torch.ones_like(r)*maxv
        dvariable = (maxv-minv)
        variable = minv + dvariable*r
       
        #print(dvariable)
        return variable, dvariable