Icepool

Latest version: v1.4.0

Safety actively analyzes 641134 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 11 of 14

0.6.5

* Add `VectorDie.all()` and `VectorDie.any()`.
* More fixes to `ndim` calculation.

0.6.4

* `EmptyDie` (a die with no outcomes) is now its own class.
* `mix()` along with its weights argument is folded into the `Die()` factory.
* Fixes to `ndim` calculation.
* `apply(), EvalPool.final_outcome()` can now return dice, `hdroller.Reroll`, etc.
* Center `Ellipsis` when indexing a pool can now work on undersized pools, rather than being an error.
* Fix `lcm_weighted` denominator method.
* `len(die)` is now the same as `die.num_outcomes()` again.
* Slicing a die now refers to (sorted) outcome indexes.
* Dimension slicing is now `VectorDie.dim[select]`.

0.6.3

* `Die()` now takes a variable number of arguments. A sequence provided as a single argument will be treated as a single outcome equal to that sequence.
To have one outcome per item in the sequence, the sequence must be unpacked into multiple arguments.
* `min_outcome` and `ndim` args to `Die()` are now keyword-only.
* Non-integers are now allowed for `count_dice`. Use at your own risk.
* The third argument to a `count_dice` slice, if provided, changes the size of the pool.
* Up to one `Ellipsis` (`...`) may now be used in `count_dice`. This allows the tuple option to adapt to differently-sized pools.
* `VectorDie` outcomes are now unpacked when providing them to callable arguments in `reroll()`, `explode()`, `split()`.
* `if_else()` is now a method of `ScalarDie` rather than a free function.
* Fixed the invert operator.

0.6.2

* Rerolls in pools, `mix()`, and `sub()` are now triggered by a sentinel value `hdroller.Reroll` (rather than `None`).
* Single-`int` indexes for `count_dice` and pool `[]` operator now produce a die rather than a pool,
in analogy to sequence indexing. However, note that this is absolute relative to the whole pool
rather than relative to any previous indexing.
* `EvalPool` can now iterate in both directions even if one of `max_outcomes` or `min_outcomes` is given,
though at lower efficiency in the disfavored direction.
* Default such direction changed back to ascending.
* Re-implemented `clip()`.
* The minimum outcome of `highest()` is equal to the highest minimum outcome among all input dice
and likewise for `lowest()`. This will prevent introducing zero-weight outcomes where they did not exist before.

0.6.1

* Pool `max_outcomes` or `min_outcomes` outside the range of the fundamental die is now an error.
* Pools no longer automatically shrink the die to fit `max_outcomes` or `min_outcomes`. This is to guarantee a predictable iteration order.
* Improved `str(die)` formatting.
* `VectorDie` outcomes are automatically converted to tuples.
* `ScalarDie` now has `ndim='scalar'` rather than `ndim=False`.
* Add `standard_pool()` function for easy creation of standard pools.
* Removed `reroll_lt()`, etc. as they weren't enough faster than `reroll(func)` to justify spending extra space.

0.6.0

* Removed `initial_state()` in favor of using `None` as the initial state.
* Added simple `pool.eval()` method.
* `None` now rerolls in `EvalPool`.
* Fix `trunc`, `floor`, `ceil`.
* Various improvements to pool algorithm.
* Add some thresholding methods for dice.
* Max/min renamed to highest/lowest.
* Improve empty die handling.
* Improved `VectorDie` string formatting.
* Disabled `reverse()`.

Page 11 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.