Skip to content
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

Add random laplace number and div_or_else function #155

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

SemyonSinchenko
Copy link
Collaborator

On branch feature/random-fenerators
Changes to be committed:
new file: quinn/math.py

Related to #88

I have no idea how to test generation of random numbers without installing numpy. But I made few local tests and looks like it works.

  1. There is the result of rand_laplace(mu=-5, beta=4):
    laplace_m5_4

  2. There is the result of rand_laplace(mu=1, beta=2):
    laplace_1_2

And there is how it should look like based on Wiki:
image

One can see that distribution is correct. Also negative mu is processed correctly too.

 On branch feature/random-fenerators
 Changes to be committed:
	new file:   quinn/math.py
 On branch feature/random-fenerators
 Changes to be committed:
	modified:   quinn/math.py
Copy link
Collaborator

@jeffbrennan jeffbrennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! We should also add to the init script right?

@SemyonSinchenko
Copy link
Collaborator Author

@jeffbrennan I went though the issue and see that we discussed that this part will be used like quinn.math. What do you think about it? In this case it is not needed to add it to __init__.py

@jeffbrennan
Copy link
Collaborator

@SemyonSinchenko

Yeah looks good then. Thanks for checking that

@SemyonSinchenko SemyonSinchenko merged commit b4263aa into main Nov 23, 2023
1 check passed
@SemyonSinchenko SemyonSinchenko deleted the feature/random-fenerators branch July 14, 2024 09:49
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