alumbreras / ARS

Python implementation of Adaptive Rejection Sampling
MIT License
14 stars 5 forks source link

f is implicitly assumed to be friendly to array input #2

Open junchenfeng opened 7 years ago

junchenfeng commented 7 years ago

a more general interface np.array([f(x) for x in self.x]) allows for function that is not necessary array friendly.

acruis commented 7 years ago

Can be fixed with a np.vectorize call, too.