Skip to content

Commit

Permalink
make s a property
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew McCluskey committed May 19, 2020
1 parent 2ce8916 commit 4fed787
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
1 change: 1 addition & 0 deletions uravu/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def n(self):
"""
return np.percentile(self.samples, [50])[0]

@property
def s(self):
"""
Get the standard deviation of the distribution. For a non-normal distribution, this will return :py:attr:`None`.
Expand Down
11 changes: 1 addition & 10 deletions uravu/tests/test_optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ class TestOptimize(unittest.TestCase):
Unit tests for optimize module.
"""

def test_ln_likelihood_a(self):
"""
Test ln_likelihood function.
"""
def test_ln_likelihood(self):
test_rel = relationship.Relationship(
utils.straight_line, TEST_X, TEST_Y
)
Expand All @@ -37,9 +34,6 @@ def test_ln_likelihood_a(self):
assert_almost_equal(actual_lnl, expected_lnl, decimal=0)

def test_negative_lnl(self):
"""
Test negative_lnl function.
"""
test_rel = relationship.Relationship(
utils.straight_line, TEST_X, TEST_Y
)
Expand All @@ -50,9 +44,6 @@ def test_negative_lnl(self):
assert_almost_equal(actual_negative_lnl, expected_negtive_lnl, decimal=0)

def test_max_lnlikelihood(self):
"""
Test negative_lnl function.
"""
test_rel = relationship.Relationship(
utils.straight_line, TEST_X, TEST_Y
)
Expand Down

0 comments on commit 4fed787

Please sign in to comment.