File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -68,17 +68,18 @@ def test_pandas_to_array(self):
68
68
# Check function behavior with Theano graph variable
69
69
theano_output = func (theano_graph_input )
70
70
assert isinstance (theano_output , theano .gof .graph .Variable )
71
- assert theano_output .name == input_name
71
+ assert theano_output .owner . inputs [ 0 ]. name == input_name
72
72
73
73
# Check function behavior with generator data
74
74
generator_output = func (square_generator )
75
+
76
+ # Output is wrapped with `pm.floatX`, and this unwraps
77
+ wrapped = generator_output .owner .inputs [0 ]
75
78
# Make sure the returned object has .set_gen and .set_default methods
76
- assert hasattr (generator_output , "set_gen" )
77
- assert hasattr (generator_output , "set_default" )
79
+ assert hasattr (wrapped , "set_gen" )
80
+ assert hasattr (wrapped , "set_default" )
78
81
# Make sure the returned object is a Theano TensorVariable
79
- assert isinstance (generator_output , tt .TensorVariable )
80
-
81
- return None
82
+ assert isinstance (wrapped , tt .TensorVariable )
82
83
83
84
def test_as_tensor (self ):
84
85
"""
You can’t perform that action at this time.
0 commit comments