# WARNING: Base.MersenneTwister is deprecated: it has been moved to the standard library package \`Random\`

**URL:** <https://discourse.julialang.org/t/warning-base-mersennetwister-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19842>\
**Category:** General Usage\
**Created:** [January 20, 2019, 1:45pm UTC](https://discourse.julialang.org/t/warning-base-mersennetwister-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19842 "2019-01-20T13:45:57Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [January 20, 2019, 2:40pm UTC](https://discourse.julialang.org/t/warning-base-mersennetwister-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19842/5 "2019-01-20T14:40:26Z")

</div>

@IljaK91, thank you so much for your quick reply. But the following is what I meant.

> [@A uniform way to generate a random element based on a given probability distritution function, a random number genarator and a given element interval?](https://discourse.julialang.org/t/a-uniform-way-to-generate-a-random-element-based-on-a-given-probability-distritution-function-a-random-number-genarator-and-a-given-element-interval/19843):
>
> Dispatching is one of Julia’s strong suits. I was wondering, is there a single function which would generate a random element based on a given probability distribution function, a random number genarator and a given element interval? I’m using Julia 0.7. If not, what are your suggestions? I’m talking about something similar to the fit\_mle(D, x, w) method in the DIstribution.jl. [Distributions.fit\_mle](https://juliastats.github.io/Distributions.jl/stable/fit.html#Distributions.fit_mle-Tuple%7BAny,Any,Any%7D) — Method. fit\_mle(D, x, w) Fit a distribution of type D to a weighted data set x , with …

---

_[View the full topic](https://discourse.julialang.org/t/warning-base-mersennetwister-is-deprecated-it-has-been-moved-to-the-standard-library-package-random/19842)._
