ENH: Adds a better error if root mask is empty

This commit is contained in:
llllllllll
2015-10-09 17:45:03 -04:00
parent a18b1d7adb
commit fca637a40b
+4 -1
View File
@@ -232,7 +232,10 @@ class SimplePipelineEngine(object):
# Filter out columns that didn't exist between the requested start and
# end dates.
existed = lifetimes.iloc[extra_rows:].any()
return lifetimes.loc[:, existed]
ret = lifetimes.loc[:, existed]
shape = ret.shape
assert shape[0] * shape[1] != 0, 'root mask cannot be empty'
return ret
def _mask_and_dates_for_term(self, term, workspace, graph, dates):
"""