Skip to content

ENH: impl random.pareto #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2021
Merged

ENH: impl random.pareto #518

merged 1 commit into from
Jan 22, 2021

Conversation

samir-nasibli
Copy link

Description

pareto(a[, size]) Draw samples from a Pareto II or Lomax distribution with specified shape.

TODO

  • array_like of floats for a param
  • tests for backend dpnp_rng_pareto_c

Reproduce

>>> a= 30.
>>> np.mean(dpnp.random.pareto(a, size=10**6)); np.mean(np.random.pareto(a, size=10**6))
1.0345331694970257
0.0345063959568665
>>> np.var(dpnp.random.pareto(a, size=10**6)); np.var(np.random.pareto(a, size=10**6))
0.0012693687866730547
0.0012701945158571334

Checklist

  • Docstrings for all functions
  • Gallery example in ./doc/examples (new features only)
  • Unit tests:
  • Clean style in the spirit of PEP8

@samir-nasibli samir-nasibli requested a review from shssf January 22, 2021 03:52
@shssf shssf merged commit 8c20103 into master Jan 22, 2021
@shssf shssf deleted the samir-nasibli/enh/random_pareto branch January 22, 2021 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants