Summary

We calculated the correlation of the stock returns of two stocks with the corrcoef() function. As a bonus, we demonstrated the diagonal() and trace() functions, which can give us the diagonal and trace of a matrix.

We fit data to a polynomial with the polyfit() function. We learned about the polyval() function that computes the values of a polynomial, the roots() function that returns the roots of the polynomial, and the polyder() function, which gives back the derivative of a polynomial.

We saw that the full() function fills an array with a number, and the full_like() function uses the metadata of an input array to create a new array. Both functions allow you to specify the data type.

Hopefully, you have increased your productivity, so that we can continue in the next chapter with matrices and Universal Functions (ufuncs).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset