Skip to content

Commit ce65a4f

Browse files
kyleabeauchamptwiecki
authored andcommitted
Revert some of the extra floatX
1 parent 607af64 commit ce65a4f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pymc3/tests/test_distributions.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import division
22

33
import itertools
4-
from .helpers import SeededTest, fxarray, select_by_precision
4+
from .helpers import SeededTest, select_by_precision
55
from ..vartypes import continuous_types
66
from ..model import Model, Point, Potential
77
from ..blocking import DictToVarBijection, DictToArrayBijection, ArrayOrdering
@@ -31,13 +31,13 @@ def get_lkj_cases():
3131
Log probabilities calculated using the formulas in:
3232
http://www.sciencedirect.com/science/article/pii/S0047259X09000876
3333
"""
34-
tri = fxarray([0.7, 0.0, -0.7])
34+
tri = np.array([0.7, 0.0, -0.7])
3535
return [
3636
(tri, 1, 3, 1.5963125911388549),
3737
(tri, 3, 3, -7.7963493376312742),
3838
(tri, 0, 3, -np.inf),
39-
(fxarray([1.1, 0.0, -0.7]), 1, 3, -np.inf),
40-
(fxarray([0.7, 0.0, -1.1]), 1, 3, -np.inf)
39+
(np.array([1.1, 0.0, -0.7]), 1, 3, -np.inf),
40+
(np.array([0.7, 0.0, -1.1]), 1, 3, -np.inf)
4141
]
4242

4343

@@ -587,7 +587,7 @@ def test_multinomial(self, n):
587587

588588
def test_multinomial_vec(self):
589589
vals = np.array([[2,4,4], [3,3,4]])
590-
p = fxarray([0.2, 0.3, 0.5])
590+
p = np.array([0.2, 0.3, 0.5])
591591
n = 10
592592

593593
with Model() as model_single:
@@ -602,7 +602,7 @@ def test_multinomial_vec(self):
602602

603603
def test_multinomial_vec_1d_n(self):
604604
vals = np.array([[2,4,4], [4,3,4]])
605-
p = fxarray([0.2, 0.3, 0.5])
605+
p = np.array([0.2, 0.3, 0.5])
606606
ns = np.array([10, 11])
607607

608608
with Model() as model:
@@ -614,7 +614,7 @@ def test_multinomial_vec_1d_n(self):
614614

615615
def test_multinomial_vec_1d_n_2d_p(self):
616616
vals = np.array([[2,4,4], [4,3,4]])
617-
ps = fxarray([[0.2, 0.3, 0.5],
617+
ps = np.array([[0.2, 0.3, 0.5],
618618
[0.9, 0.09, 0.01]])
619619
ns = np.array([10, 11])
620620

@@ -627,7 +627,7 @@ def test_multinomial_vec_1d_n_2d_p(self):
627627

628628
def test_multinomial_vec_2d_p(self):
629629
vals = np.array([[2,4,4], [3,3,4]])
630-
ps = fxarray([[0.2, 0.3, 0.5],
630+
ps = np.array([[0.2, 0.3, 0.5],
631631
[0.3, 0.3, 0.4]])
632632
n = 10
633633

@@ -640,7 +640,7 @@ def test_multinomial_vec_2d_p(self):
640640

641641
def test_categorical_bounds(self):
642642
with Model():
643-
x = Categorical('x', p=fxarray([0.2, 0.3, 0.5]))
643+
x = Categorical('x', p=np.array([0.2, 0.3, 0.5]))
644644
assert np.isinf(x.logp({'x': -1}))
645645
assert np.isinf(x.logp({'x': 3}))
646646

@@ -661,7 +661,7 @@ def test_addpotential(self):
661661
self.check_dlogp(model, value, R, {})
662662

663663
def test_get_tau_sd(self):
664-
sd = fxarray([2])
664+
sd = np.array([2])
665665
assert_almost_equal(continuous.get_tau_sd(sd=sd), [1. / sd**2, sd])
666666

667667
@pytest.mark.parametrize('value,mu,sigma,nu,logp', [

0 commit comments

Comments
 (0)