Skip to content

Commit

Permalink
fixed an error with ==None to is None
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewReid854 committed Jul 24, 2019
1 parent 6fe347c commit 392f120
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reliability/Nonparametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ def __init__(self,data,censoring=None,show_plot=True,print_results=True,plot_CI=
raise TypeError('Incorrect type for data. Data must be numpy array or list.')

if d != sorted(d):
if censoring==None: #automatic sorting is done only if there is no censoring
if censoring is None: #automatic sorting is done only if there is no censoring
d = sorted(d)
else:
raise ValueError('Data input must be sorted in ascending order. Due to complications that may arise from pairing censoring codes with data, automatic sorting is not implemented if censoring is specified.')

if censoring==None:
if censoring is None:
censoring = list(np.ones(len(d)))

if type(censoring)== np.ndarray:
Expand Down

0 comments on commit 392f120

Please sign in to comment.