mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-04 06:25:04 +08:00
ENH: replaced union with intersection in assert (more stringent).
This commit is contained in:
@@ -402,7 +402,7 @@ class BatchTransform(EventWindow):
|
||||
# extract field names from sids (price, volume etc), make sure
|
||||
# every sid has the same fields.
|
||||
sid_keys = [set(sid.keys()) for sid in event.data.itervalues()]
|
||||
assert sid_keys[0] == set.union(*sid_keys),\
|
||||
assert sid_keys[0] == set.intersection(*sid_keys),\
|
||||
"Each sid must have the same keys."
|
||||
if self.field_names is None:
|
||||
unwanted_fields = set(['portfolio', 'sid', 'dt', 'type',
|
||||
|
||||
Reference in New Issue
Block a user