Chapter 3. Get to Grips with Commonly Used Functions

In this chapter, we will cover a number of commonly used functions:

  • sqrt, log, arange, astype, and sum
  • ceil, modf, where, ravel, and take
  • sort and outer
  • diff, sign, eig
  • histogram and polyfit
  • compress and randint

We will be discussing these functions through the following recipes:

  • Summing Fibonacci numbers
  • Finding prime factors
  • Finding palindromic numbers
  • The steady state vector determination
  • Discovering a power law
  • Trading periodically on dips
  • Simulating trading at random
  • Sieving integers with the Sieve of Eratosthenes

Introduction

This chapter is about the commonly used functions. These are the functions that you will be using on a daily basis. Obviously, the usage may differ for you. There are so many NumPy functions that it is virtually impossible to know all of them, but the functions in this chapter will be the bare minimum with which we must be familiar. You can download source code for this chapter from the book website http://www.packtpub.com.

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

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