From 2f479926c16d2911d0dd878c21de082abfc5b237 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 8 Mar 2016 13:26:28 +0100 Subject: Revive project --- gentext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gentext.py') diff --git a/gentext.py b/gentext.py index b8a27bf..2079602 100644 --- a/gentext.py +++ b/gentext.py @@ -46,7 +46,7 @@ class GenText(SimpleExtension): sys.stdout.write(self.init_text) while v.shape[1] < self.max_bytes: prob = prob / 1.00001 - pred = numpy.random.multinomial(1, prob[0, :]).nonzero()[0][0] + pred = numpy.random.multinomial(1, prob[0, :]).nonzero()[0][0].astype('int16') v = numpy.concatenate([v, pred[None, None]], axis=1) sys.stdout.write(chr(int(pred))) -- cgit v1.2.3