<s> import numpy as _np <EOL> from DeepFried2 import floatX as _floatX <EOL> def data ( T , N , nterms = <NUM_LIT:2> ) : <EOL> """<STR_LIT>""" <EOL> X = _np . random . rand ( N , T ) . astype ( _floatX ) <EOL> mask = _np . zeros ( ( N , T ) , _floatX ) <EOL> for i in range ( N ) : <EOL> mask [ i , _np . random . choice ( T , size = nterms , replace = False ) ] = <NUM_LIT:1> <EOL> y = _np . sum ( X [ mask > <NUM_LIT:0> ] . reshape ( ( - <NUM_LIT:1> , nterms ) ) , axis = <NUM_LIT:1> ) <EOL> X = _np . stack ( [ X , mask ] , axis = - <NUM_LIT:1> ) <EOL> return X , y [ : , None ] </s>
