Book Image

NumPy Cookbook - Second Edition

By : Ivan Idris
Book Image

NumPy Cookbook - Second Edition

By: Ivan Idris

Overview of this book

<p>NumPy has the ability to give you speed and high productivity. High performance calculations can be done easily with clean and efficient code, and it allows you to execute complex algebraic and mathematical computations in no time.</p> <p>This book will give you a solid foundation in NumPy arrays and universal functions. Starting with the installation and configuration of IPython, you'll learn about advanced indexing and array concepts along with commonly used yet effective functions. You will then cover practical concepts such as image processing, special arrays, and universal functions. You will also learn about plotting with Matplotlib and the related SciPy project with the help of examples. At the end of the book, you will study how to explore atmospheric pressure and its related techniques. By the time you finish this book, you'll be able to write clean and fast code with NumPy.</p>
Table of Contents (19 chapters)
NumPy Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Analyzing code with Pylint


Pylint is another open source static analyzer originally created by Logilab. Pylint is more complex than Pyflakes; it allows more customization and code checks. However, it is slower than Pyflakes. For more information, check out the manual at http://www.logilab.org/card/pylint_manual.

In this recipe, we again download the NumPy code from the Git repository—this step has been omitted for brevity.

Getting ready

You can install Pylint from the source distribution. However, there are many dependencies, so you are better off installing with either easy_install or pip. The installation commands are as follows:

$ easy_install pylint
$ sudo pip install pylint

How to do it...

We will again analyze from the top directory of the NumPy codebase. Notice that we get more output. In fact, Pylint prints so much text that most of it had to be omitted here:

$ pylint *.py
No config file found, using default configuration
************* Module pavement
C: 60: Line too long (81/80)
C:139...