• Complain

Eli Bressert [Eli Bressert] - SciPy and NumPy

Here you can read online Eli Bressert [Eli Bressert] - SciPy and NumPy full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2012, publisher: O’Reilly Media, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Eli Bressert [Eli Bressert] SciPy and NumPy

SciPy and NumPy: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "SciPy and NumPy" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Are you new to SciPy and NumPy? Do you want to learn it quickly and easily through examples and a concise introduction? Then this is the book for you. Youll cut through the complexity of online documentation and discover how easily you can get up to speed with these Python libraries.

Ideal for data analysts and scientists in any field, this overview shows you how to use NumPy for numerical processing, including array indexing, math operations, and loading and saving data. Youll learn how SciPy helps you work with advanced mathematical functions such as optimization, interpolation, integration, clustering, statistics, and other tools that take scientific programming to a whole new level.

The new edition is now available, fully revised and updated in June 2013.

  • Learn the capabilities of NumPy arrays, element-by-element operations, and core mathematical operations
  • Solve minimization problems quickly with SciPys optimization package
  • Use SciPy functions for interpolation, from simple univariate to complex multivariate cases
  • Apply a variety of SciPy statistical tools such as distributions and functions
  • Learn SciPys spatial and cluster analysis classes
  • Save operation time and memory usage with sparse matrices

**

Eli Bressert [Eli Bressert]: author's other books


Who wrote SciPy and NumPy? Find out the surname, the name of the author of the book and a list of all author's works by series.

SciPy and NumPy — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "SciPy and NumPy" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Appendix A. About the Author

Eli Bressert was born in Tucson, Arizona. He worked as a science imager for NASAs Chandra X-ray Space Telescope, optimizing science images that are frequently seen on book covers, newspapers, television, and other media. Afterward, Eli obtained his PhD in astrophysics at the University of Exeter and is currently a Bolton Fellow at CSIRO Astronomy and Space Science in Sydney, Australia. For the last six years, Eli has been programming in Python and giving Python lectures at Harvard University, the European Space Astronomy Centre, and the European Southern Observatory. He is one of the founding developers of two well-known astrophysics Python packages: ATpy and APLpy.

About the Author

Eli Bressert was born in Tucson, Arizona. He worked as a science imager for NASA's Chandra X-ray Space Telescope optimizing science images which are frequently seen on book covers, newspapers, television, and other media. Afterward, Eli obtained his PhD in astrophysics at the University of Exeter and is currently a Bolton Fellow at CSIRO Astronomy and Space Science in Sydney, Australia. For the past six years Eli has been programming in Python and giving Python lectures at Harvard University, the European Space Astronomy Centre, and the European Southern Observatory. He is one of the founding developers for two well-known astrophysics Python packages: ATpy and APLpy.

Chapter 1. Introduction

Python is a powerful programming language when considering portability, flexibility, syntax, style, and extendability. The language was written by Guido van Rossum with clean syntax built in. To define a function or initiate a loop, indentation is used instead of brackets. The result is profound: a Python programmer can look at any given uncommented Python code and quickly understand its inner workings and purpose.

Compiled languages like Fortran and C are natively much faster than Python, but not necessarily so when Python is bound to them. Using packages like Cython enables Python to interface with C code and pass information from the C program to Python and vice versa through memory. This allows Python to be on par with the faster languages when necessary and to use legacy code (e.g., FFTW ). The combination of Python with fast computation has attracted scientists and others in large numbers. Two packages in particular are the powerhouses of scientific Python: NumPy and SciPy. Additionally, these two packages makes integrating legacy code easy.

1.1 Why SciPy and NumPy?

The basic operations used in scientific programming include arrays, matrices, integration, differential equation solvers, statistics, and much more. Python, by default, does not have any of these functionalities built in, except for some basic mathematical operations that can only deal with a variable and not an array or matrix. NumPy and SciPy are two powerful Python packages, however, that enable the language to be used efficiently for scientific purposes.

NumPy specializes in numerical processing through multi-dimensional ndarrays, where the arrays allow element-by-element operations, a.k.a. broadcasting. If needed, linear algebra formalism can be used without modifying the NumPy arrays beforehand. Moreover, the arrays can be modified in size dynamically. This takes out the worries that usually mire quick programming in other languages. Rather than creating a new array when you want to get rid of certain elements, you can apply a mask to it.

SciPy is built on the NumPy array framework and takes scientific programming to a whole new level by supplying advanced mathematical functions like integration, ordinary differential equation solvers, special functions, optimizations, and more. To list all the functions by name in SciPy would take several pages at minimum. When looking at the plethora of SciPy tools, it can sometimes be daunting even to decide which functions are best to use. That is why this book has been written. We will run through the primary and most often used tools, which will enable the reader to get results quickly and to explore the NumPy and SciPy packages with enough working knowledge to decide what is needed for problems that go beyond this book.

1.2 Getting NumPy and SciPy

Now youre probably sold and asking, Great, where can I get and install these packages? There are multiple ways to do this, and we will first go over the easiest ways for OS X, Linux, and Windows.

There are two well-known, comprehensive, precompiled Python packages that include NumPy and SciPy, and that work on all three platforms: the Enthought Python Distribution (EPD) and ActivePython (AP). If you would like the free versions of the two packages, you should download EPD Free[] If you need support, then you can always opt for the more comprehensive packages from the two sources.

Optionally, if you are a MacPorts[] user, you can install NumPy and SciPy through the package manager. Use the MacPorts command as given below to install the Python packages. Note that installing SciPy and NumPy with MacPorts will take time, especially with the SciPy package, so its a good idea to initiate the installation procedure and go grab a cup of tea.

sudo port install py27-numpy py27-scipy py27-ipython

MacPorts supports several versions of Python (e.g., 2.6 and 2.7). So, although py27 is listed above, if you would like to use Python 2.6 instead with SciPy and NumPy then you would simply replace py27 with py26.

If youre using a Debian-based Linux distro like Ubuntu or Linux Mint, then use apt-get to install the packages.

sudo apt-get install python-numpy python-scipy

With an RPM-based system like Fedora or OpenSUSE, you can install the Python packages using yum.

sudo yum install numpy scipy

Building and installing NumPy and SciPy on Windows systems is more complicated than on the Unix-based systems, as code compilation is tricky. Fortunately, there is an excellent compiled binary installation program called python(x,y)[] that has both NumPy and SciPy included and is Windows specific.

For those who prefer building NumPy and SciPy from source, visit www.scipy.org/Download to download from either the stable or bleeding-edge repositories. Or clone the code repositories from scipy.github.com and numpy.github.com . Unless youre a pro at building packages from source code and relish the challenge, though, I would recommend sticking with the precompiled package options as listed above.

1.3 Working with SciPy and NumPy

You can work with Python programs in two different ways: interactively or through scripts. Some programmers swear that it is best to script all your code, so you dont have to redo tedious tasks again when needed. Others say that interactive programming is the way to go, as you can explore the functionalities inside out. I would vouch for both, personally. If you have a terminal with the Python environment open and a text editor to write your script, you get the best of both worlds.

For the interactive component, I highly recommend using IPython.[] It takes the best of the bash environment (e.g., using the tab button to complete a command and changing directories) and combines it with the Python environment. It does far more than this, but for the purpose of the examples in this book it should be enough to get it up and running.

Tip

Bugs in programs are a fact of life and theres no way around them. Being able to find bugs and fix them quickly and easily is a big part of successful programming. IPython contains a feature where you can debug a buggy Python script by typing debug after running it. See http://ipython.org/ipython-doc/stable/interactive/tutorial.html

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «SciPy and NumPy»

Look at similar books to SciPy and NumPy. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «SciPy and NumPy»

Discussion, reviews of the book SciPy and NumPy and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.