Fibonacci numbers
The Fibonacci numbers (see http://en.wikipedia.org/wiki/Fibonacci_number) are based on a recurrence relation:
It is difficult to express this relation directly with NumPy code. However, we can express this relation in a matrix form or use the following golden ratio formula:
with
This will introduce the matrix()
and rint()
functions. The matrix()
function creates matrices and the rint()
function rounds numbers to the closest integer, ...
Get NumPy : Beginner's Guide - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.