Squigglepy

Latest version: v0.28

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

Scan your dependencies

Page 3 of 5

0.17

* When `verbose=True` is used in `sample`, the progress bar now pops up in more relevant places and is much more likely to get triggered when relevant.
* `discrete_sample` and `mixture_sample` now can take `verbose` parameter.

0.16

* `zero_inflated` can create an arbitrary zero-inflated distribution.
* Individual sampling functions (`normal_sample`, `lognormal_sample`, etc.) can now take an argument `samples` to generate multiple samples.
* A large speedup has been achieved to sampling from the same distribution multiple times.
* `requirements.txt` has been updated.

0.15

* **[Breaking change]** `bayesnet` function now refers to parameter `memcache` where previously this parameter was called `cache`.
* **[Breaking change]** If `get_percentiles` or `get_log_percentiles` is called with just one elemement for `percentiles`, it will return that value instead of a dict.
* Fixed a bug where `get_percentiles` would not round correctly.
* `bayesnet` results can now be cached to a file. Use `dump_cache_file` to write the file and `load_cache_file` to load from the file.
* `discrete` now works with numpy arrays in addition to lists.
* Added `one_in` as a shorthand to convert percentages into "1 in X" notation.
* Distributions can now be compared with `==` and `!=`.

0.14

* Nested sampling now works as intended.
* You can now use `>>` for pipes for distributions. For example, `sq.norm(1, 2) >> dist_ceil`
* Distributions can now be compared with `>`, `<`, `>=`, and `<=`.
* `dist_max` can be used to get the maximum value between two distributions. This family of functions are not evaluated until the distribution is sampled and they work with pipes.
* `dist_min` can be used to get the minimum value between two distributions.
* `dist_round` can be used to round the final output of a distribution. This makes the distribution discrete.
* `dist_ceil` can be used to ceiling round the final output of a distribution. This makes the distribution discrete.
* `dist_floor` can be used to floor round the final output of a distribution. This makes the distribution discrete.
* `lclip` can be used to clip a distribution to a lower bound. This is the same functionality that is available within the distribution and the `sample` method.
* `rclip` can be used to clip a distribution to an upper bound. This is the same functionality that is available within the distribution and the `sample` method.
* `clip` can be used to clip a distribution to both an upper bound and a lower bound. This is the same functionality that is available within the distribution and the `sample` method.
* `sample` can now be used directly on numbers. This makes `const` functionally obsolete, but `const` is maintained for backwards compatibility and in case it is useful.
* `sample(None)` now returns `None` instead of an error.

0.13

* Sample shorthand notation can go in either order. That is, `100 sq.norm(1, 2)` now works and is the same as `sq.norm(1, 2) 100`, which is the same as `sq.sample(sq.norm(1, 2), n=100)`.

0.12

* Distributions now implement math directly. That is, you can do things like `sq.norm(2, 3) + sq.norm(4, 5)`, whereas previously this would not work. Thanks to Dawn Drescher for helping me implement this.
* `~sq.norm(1, 2)` is now a shorthand for `sq.sample(sq.norm(1, 2))`. Thanks to Dawn Drescher for helping me implement this shorthand.
* `sq.norm(1, 2) 100` is now a shorthand for `sq.sample(sq.norm(1, 2), n=100)`

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.