Skip to content

Commit e66e90b

Browse files
committed
TST: special: add a few infinity checks
1 parent 65f11e0 commit e66e90b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scipy/special/tests/test_basic.py

+6
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ def test_betaln(self):
137137
assert_equal(cephes.betaln(1,1),0.0)
138138
def test_betaincinv(self):
139139
assert_equal(cephes.betaincinv(1,1,1),1.0)
140+
def test_beta_inf(self):
141+
assert_(np.isinf(special.beta(-1, 2)))
140142

141143
def test_btdtr(self):
142144
assert_equal(cephes.btdtr(1,1,1),1.0)
@@ -1236,6 +1238,10 @@ def test_rgamma(self):
12361238
rlgam = 1/special.gamma(8)
12371239
assert_almost_equal(rgam,rlgam,8)
12381240

1241+
def test_infinity(self):
1242+
assert_(np.isinf(special.gamma(-1)))
1243+
assert_equal(special.rgamma(-1), 0)
1244+
12391245
class TestHankel(TestCase):
12401246

12411247
def test_negv1(self):

0 commit comments

Comments
 (0)