Skip to content

Commit 24730cc

Browse files
nokadosjunpenglao
authored andcommitted
fixed ValueError raised when mask is empty (#3580)
1 parent abed823 commit 24730cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pymc3/model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,10 @@ def pandas_to_array(data):
13081308
else:
13091309
ret = data.values
13101310
elif hasattr(data, 'mask'):
1311-
ret = data
1311+
if data.mask.any():
1312+
ret = data
1313+
else: # empty mask
1314+
ret = data.filled()
13121315
elif isinstance(data, theano.gof.graph.Variable):
13131316
ret = data
13141317
elif sps.issparse(data):

0 commit comments

Comments
 (0)