forked from liam2/liam2
-
Notifications
You must be signed in to change notification settings - Fork 4
context
AlexisEidelman edited this page May 9, 2015
·
2 revisions
On avait
def new_context_like(context, length=None):
if length is None:
length = context_length(context)
#FIXME: nan should come from somewhere else
return {'period': context['period'],
'__len__': length,
'__entity__': context['__entity__'],
'__globals__': context['__globals__'],
'nan': float('nan')}
on ajoute deux lignes pour avoir:
def new_context_like(context, length=None):
if length is None:
length = context_length(context)
#FIXME: nan should come from somewhere else
return {'period': context['period'],
'periods': context['periods'],
'period_idx': context['period_idx'],
'__len__': length,
'__entity__': context['__entity__'],
'__globals__': context['__globals__'],
'nan': float('nan')}