[Draft] seed: use Ellipsis to indicate keeping current seed#269
[Draft] seed: use Ellipsis to indicate keeping current seed#269MuellerSeb wants to merge 4 commits intomainfrom
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 |
|
Will keep it as a draft for now. And yes, Ellipsis are fancy :-) |
d1a4662 to
bae13af
Compare
We used
np.nanto 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.nansince we can't useNonewhich is a special value for seeds. Since Python provides a dedicated constant to be used as a placeholder, I would use it here.