@hendrikS:
Das ginge dann so, oder?
Code: Alles auswählen
import itertools
import numpy as np
def fibo():
fibo_matrix = np.matrix([[1., 1.0], [1., 0.]])
akku = fibo_matrix.copy()
fibo_matrix **= 3
exponent = 2
while True:
yield akku[1,1]
yield akku[0,1]
yield akku[0,0]
akku *= fibo_matrix
for n in itertools.islice(fibo(), 1000): #hart an der grenze von 'float'
print n

scnr, Jörg