This code should generate random data within bounds. I understand there is mismatch problem with the arrays, but I'm not sure what it is. Does this mean that the lower and upper bounds defined in the code make it impossible to work?
import pandas as pd
import numpy as np
from scipy.stats import qmc
sampler = qmc.LatinHypercube(d=4)
u_bounds = np.array([[2], [10], [10], [2]])
l_bounds = np.array([[0.1], [0.1], [0.1], [0.1]])
data = sampler.lhs_method(100)*(u_bounds-(l_bounds)) + (l_bounds)
print(data)
The error code
ValueError: operands could not be broadcast together with shapes (100,4) (4,1)