Squigglepy

Latest version: v0.28

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

Scan your dependencies

Page 1 of 5

0.29

* ???

0.28

* **[Breaking change]** `sq.pareto` previously sampled from a Lomax distribution due to a complication with numpy. Now it properly samples from a Pareto distribution.
* **[Breaking change]** lclip / rclip have been removed from triangular distribution because that doesn't make sense.
* **[Breaking change]** You now can nest mixture and discrete distributions within mixture distributions.
* **[Breaking change]** `sq.kelly` now raises an error if you put in a price below the market price. You can pass `error=False` to disable this and return to the old behavior.
* Added `pert` distribution.
* Added `sharpe_ratio` to utilities.
* `get_percentiles`, `get_log_percentiles`, `get_mean_and_ci`, and `get_median_and_ci` now can all take an optional `weights` parameter to do a weighted version.

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.
* 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.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.