Re: Printing a generator returns "", need to print its values

2016-12-05 Thread vmahajan
On Wednesday, November 16, 2016 at 3:25:39 PM UTC-5, Peter Otten wrote: > vmaha...@centerpointmedia.com wrote: > > > I am running Python2.7, wherein I am running the following price of code: > > > > y = m.predict(input_fn=lambda:input_fn(df_predict), as_iterable=True) > > print ('Predictions: {}'

Printing a generator returns "", need to print its values

2016-11-16 Thread vmahajan
I am running Python2.7, wherein I am running the following price of code: y = m.predict(input_fn=lambda:input_fn(df_predict), as_iterable=True) print ('Predictions: {}'.format(str(y))) The output of the following is """ However, the desired output must be in the format [1 0 0 1 1 0 0 1]. Can so