Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewReid854 committed Jun 8, 2022
1 parent 2800cd8 commit 1271a62
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
11 changes: 11 additions & 0 deletions docs/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
Changelog
---------

**Version: 0.8.6 --- Currently unreleased
'''''''''''''''''''''''''''''''''''''''''
**Summary of changes**

This is bugfix release to deal with a few minor bugs.

**Bug Fixes**

- There was a floating point precision error in Distributions.Mixture_Model when the check for sum(proportions) was done. See `this issue <https://github.com/MatthewReid854/reliability/issues/29>`_ for details.

**Version: 0.8.5 --- Released: 25 May 2022**
''''''''''''''''''''''''''''''''''''''''''''

Expand Down
1 change: 0 additions & 1 deletion docs/Recommended resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ The listing of a software package here does not imply my endorsement, and is onl
- `Reliasoft <https://www.reliasoft.com/products/reliability-analysis/weibull>`_ - the industry leader for reliability engineering software.
- `SAS JMP <https://www.jmp.com/en_us/software/predictive-analytics-software.html>`_ - lots of statistical tools for data modelling and visualization. A few purpose built reliability tools. Its utility for reliability engineering will depend on your application. SAS has also released the `SAS University Edition <https://www.sas.com/en_us/software/university-edition.html>`_ which is a free software package that runs in VirtualBox and offers a reduced set of tools compared to the paid package.
- `PTC Windchill <https://www.ptc.com/en/products/plm/capabilities/quality/>`_ - a powerful tool for risk and reliability. Similar to Reliasoft but it forms one part of the larger PTC suite of tools.
- `RAMS Mentat <https://rams-mentat.com/dataanalysis/>`_ - a software application powered by WeibullR (a free R software library). It fits weibull2p, weibull3p, lognormal2p and lognormal3p distributions and their confidence intervals.
- `Isograph Reliability Workbench <https://www.isograph.com/software/reliability-workbench/>`_ - A collection of tools designed specifically for reliability engineering.
- `Item Software <https://www.itemsoft.com/reliability_prediction.html>`_ - A collection of tools for reliability engineering including FMECA, fault trees, reliability prediction, and many others.
- `SuperSMITH <https://fultonfindings.com/>`_ - This software is designed specifically for reliability engineering and has many useful tools. The user interface looks like it is from the early 1990s but the methods used are no less relevant today. This software was developed alongside the New Weibull Handbook, an excellent resource for interpreting the results of reliability engineering software.
Expand Down
6 changes: 3 additions & 3 deletions reliability/Distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8271,7 +8271,7 @@ def random_samples(self, number_of_samples, seed=None):
return np.random.choice(
self.__xvals_init,
size=number_of_samples,
p=self.__pdf_init / sum(self.__pdf_init),
p=self.__pdf_init / np.sum(self.__pdf_init),
)


Expand Down Expand Up @@ -8365,7 +8365,7 @@ def __init__(self, distributions, proportions=None):
self.__contains_normal_or_gumbel = contains_normal_or_gumbel

if proportions is not None:
if sum(proportions) != 1:
if np.sum(proportions) != 1:
raise ValueError("the sum of the proportions must be 1")
if len(proportions) != len(distributions):
raise ValueError(
Expand Down Expand Up @@ -9234,7 +9234,7 @@ def random_samples(self, number_of_samples, seed=None):
return np.random.choice(
self.__xvals_init,
size=number_of_samples,
p=self.__pdf_init / sum(self.__pdf_init),
p=self.__pdf_init / np.sum(self.__pdf_init),
)


Expand Down
2 changes: 1 addition & 1 deletion reliability/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from datetime import date

__title__ = 'reliability'
__version__ = "0.8.5"
__version__ = "0.8.6"
__description__ = 'A Python library for reliability engineering'
__url__ = 'https://reliability.readthedocs.io/en/latest/index.html'
__author__ = 'Matthew Reid'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="reliability",
version="0.8.5",
version="0.8.6",
description="Reliability Engineering toolkit for Python",
author="Matthew Reid",
author_email="alpha.reliability@gmail.com",
Expand Down

0 comments on commit 1271a62

Please sign in to comment.