-
Notifications
You must be signed in to change notification settings - Fork 74
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
[Draft] seed: use Ellipsis to indicate keeping current seed #269
base: main
Are you sure you want to change the base?
Conversation
Hmm, I don't have very strong feelings about this one. I don't see |
Maybe you are right. np.nan still makes sense, I was just happy about learning, that Ellipsis is used as a placeholder as described here for example: https://realpython.com/python-ellipsis/#in-short-use-the-ellipsis-as-a-placeholder-in-python We can also keep the current behavior. |
Woah! You can even replace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's up to you ;-)
Will keep it as a draft for now. And yes, Ellipsis are fancy :-) |
d1a4662
to
bae13af
Compare
We used
np.nan
to indicate to keep the current seed in the RNG, which is a bit of a hack IMHO.Python provides a special built in constant to be used as placeholder: Ellipsis
In my opinion it is more intuitive to state
seed=...
to keep the seed in contrast toseed=np.nan
since we can't useNone
which is a special value for seeds. Since Python provides a dedicated constant to be used as a placeholder, I would use it here.