You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both lognorm_ex and lognorm_im currently fail when passed a callable parameter.
To reproduce:
import starsim as ss
import sciris as sc
import numpy as np
sim = sc.prettyobj()
sim.n = 10
sim.people = sc.prettyobj()
sim.people.uid = np.arange(sim.n)
sim.people.slot = np.arange(sim.n)
sim.people.age = np.random.uniform(0, 90, size=sim.n)
def custom_mean(module, sim, uids):
out = sim.people.age[uids]
return out
testdist = ss.lognorm_ex(mean=custom_mean, stdev=2).initialize() # fails with TypeError: '<=' not supported between instances of 'function' and 'int'
testdist2 = ss.lognorm_im(mean=custom_mean, sigma=np.log(2)).initialize() # fails with TypeError: loop of ufunc does not support argument 0 of type function which has no callable exp method
The text was updated successfully, but these errors were encountered:
Both
lognorm_ex
andlognorm_im
currently fail when passed a callable parameter.To reproduce:
The text was updated successfully, but these errors were encountered: