MAINT: Use more exact boolean checks for pandas structures.

To prepare for being compatible with pandas==0.13.0, which is stricter
on boolean checks.
This commit is contained in:
Eddie Hebert
2014-01-29 17:13:13 -05:00
parent ff965060ff
commit 9feed61748
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -53,11 +53,11 @@ class DualEMATaLib(TradingAlgorithm):
self.buy = False
self.sell = False
if self.short_ema > self.long_ema and not self.invested:
if (self.short_ema > self.long_ema).all() and not self.invested:
self.order('AAPL', 100)
self.invested = True
self.buy = True
elif self.short_ema < self.long_ema and self.invested:
elif (self.short_ema < self.long_ema).all() and self.invested:
self.order('AAPL', -100)
self.invested = False
self.sell = True
+1 -1
View File
@@ -381,7 +381,7 @@ class BatchTransform(object):
else:
data = self.rolling_panel.get_current()
if self.supplemental_data:
if self.supplemental_data is not None:
for item in data.items:
if item not in self.supplemental_data.items:
continue