Fixed numpy error when using w.past in w_ipa: optional argument seg_ids would either be a None type or a numpy array, but checking if it was None failed when it was specified.
@@ -335,8 +335,11 @@ class __get_data_for_iteration__(object):
self.parent = parent
current = {}
current['iteration'] = value
+ try:
if seg_ids == None:
seg_ids = xrange(0, iter_group['seg_index']['weight'].shape[0])
+ except:
+ pass
# Just make these easier to access.
current['weights'] = iter_group['seg_index']['weight'][seg_ids]
current['pcoord'] = iter_group['pcoord'][...][seg_ids, :, :]
