Squigglepy

Latest version: v0.27

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

Scan your dependencies

Page 1 of 5

0.27

* **[Breaking change]** This package now only supports Python 3.9 and higher.
* **[Breaking change]** `get_percentiles` and `get_log_percentiles` now always return a dictionary, even if there's only one element.
* **[Breaking change]** `.type` is now removed from distribution objects.
* **[Breaking change]** You now can nest mixture distributions within mixture distributoins.
* You can now create correlated variables using `sq.correlate`.
* Added `geometric` distribution.
* Distribution objects now have the version of squigglepy they were created with, which can be accessed via `obj._version`. This should be helpful for debugging and noticing stale objects, especially when squigglepy distributions are stored in caches.
* Distributions can now be hashed with `hash`.
* Fixed a bug where `tdist` would not return multiple samples if defined with `t` alone.
* Package load time is now ~2x faster.
* Mixture sampling is now ~2x faster.
* Pandas and matplotlib as removed as required dependencies, but their related features are lazily enabled when the modules are available. These packages are still available for install as extras, installable with `pip install squigglepy[plots]` (for plotting-related functionality, matplotlib for now), `pip install squigglepy[ecosystem]` (for pandas, and in the future other related packages), or `pip install squigglepy[all]` (for all extras).
* Multicore distribution now does extra checks to avoid crashing from race conditions.
* Using black now for formatting.
* Switched from `flake8` to `ruff`.

0.26

* **[Breaking change]** `lognorm` can now be defined either referencing the mean and sd of the underlying normal distribution via `norm_mean` / `norm_sd` or via the mean and sd of the lognormal distribution itself via `lognorm_mean` / `lognorm_sd`. To further disambiguate, `mean` and `sd` are no longer variables that can be passed to `lognorm`.

0.25

* Added `plot` as a method to more easily plot distributions.
* Added `dist_log` and `dist_exp` operators on distributions.
* Added `growth_rate_to_doubling_time` and `doubling_time_to_growth_rate` convenience functions. These take numbers, numpy arrays or distributions.
* Mixture distributions now print with weights in addition to distributions.
* Changes `get_log_percentiles` to report in scientific notation.
* `bayes` now supports separate arguments for `memcache_load` and `memcache_save` to better customize how memcache behavior works. `memcache` remains a parameter that sets both `memcache_load` and `memcache_save` to True.

0.24

* Distributions can now be negated with `-` (e.g., `-lognorm(0.1, 1)`).
* Numpy ints and floats can now be used for determining the number of samples.
* Fixed some typos in the documentation.

0.23

* Added `pareto` distribution.
* Added `get_median_and_ci` to return the median and a given confidence interval for data.
* `discrete` and `mixture` distributions now give more detail when printed.
* Fixed some typos in the documentation.

0.22

* Added `extremize` to extremize predictions.
* Added `normalize` to normalize a list of numbers to sum to 1.
* Added `get_mean_and_ci` to return the mean and a given confidence interval for data.
* Added `is_dist` to determine if an object is a Squigglepy distribution.
* Added `is_sampleable` to determine if an object can be sampled using `sample`.
* Support for working within Pandas is now explicitly added. `pandas` has been added as a requirement.
* `discrete` sampling now will compress a large array if possible for more efficient sampling.
* `clip`, `lclip`, and `rclip` can now be used without needing distributions.
* Some functions (e.g, `geomean`) previously only supported lists, dictionaries, and numpy arrays. They have been expanded to support all iterables.
* `dist_max` and `dist_min` now support pipes (`>>`)
* `get_percentiles` now coerces output to integer if `digits` is less than or equal to 0, instead of just exactly 0.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.