June 2017
Beginner to intermediate
274 pages
6h 49m
English
In the following code example, you'll see that we're getting to the reason why we called our class StatisticalArray. We implemented several discrete statistical calculations using the values stored in the class instance. You don't need to worry about what mean, variance, and covariance actually do, but let's take a look at how they're actually working.

In the mean function, here, we see a loop that calculates the sum of the values stored in the array. If we were running that code in Python, each cycle through the loop would involve several dictionary lookups and function calls. Cython generates four lines of C ...
Read now
Unlock full access