1.

Record Nr.

UNINA9910957689903321

Autore

Idris Ivan

Titolo

NumPy cookbook / / Ivan Idris

Pubbl/distr/stampa

Birmingham, [Eng.], : Packt Publishing, 2012

ISBN

9781283739047

1283739046

9781849518932

1849518939

Edizione

[1st ed.]

Descrizione fisica

1 online resource (226 p.)

Disciplina

006.76

Soggetti

Python (Computer program language)

Numerical analysis - Data processing

Lingua di pubblicazione

Inglese

Formato

Materiale a stampa

Livello bibliografico

Monografia

Note generali

Includes index.

Nota di contenuto

Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1:Winding Along with IPython; Introduction; Installing IPython; Using IPython as a shell; Reading manual pages; Installing Matplotlib; Running a web notebook; Exporting a web notebook; Importing a web notebook; Configuring a notebook server; Exploring the SymPy profile; Chapter 2:Advanced Indexing and Array Concepts; Introduction; Installing SciPy; Installing PIL; Resizing images; Creating views and copies; Flipping Lena; Fancy indexing; Indexing with a list of locations

Indexing with booleansStride tricks for Sudoku; Broadcasting arrays; Chapter 3:Get to Grips with Commonly Used Functions; Introduction; 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 Erasthothenes; Chapter 4:Connecting NumPy with the Rest of the World; Introduction; Using the buffer protocol; Using the array interface; Exchanging data with MATLAB and Octave; Installing RPy2; Interfacing with R

Installing JPypeSending a NumPy array to JPype; Installing Google App Engine; Deploying NumPy code in the Google cloud; Running NumPy



code in a Python Anywhere web console; Setting up PiCloud; Chapter 5:Audio and Image Processing; Introduction; Loading images into memory map; Combining images; Blurring images; Repeating audio fragments; Generating sounds; Designing an audio filter; Edge detection with the Sobel filter; Chapter 6:Special Arrays and Universal Functions; Introduction; Creating a universal function; Finding Pythagorean triples; Performing string operations with chararray

Creating a masked arrayIgnoring negative and extreme values; Creating a scores table with recarray; Chapter 7:and Debugging; Introduction; Profiling with timeit; Profiling with IPython; Installing line_profiler; Profiling code with line_profiler; Profiling code with the cProfile extension; Debugging with IPython; Debugging with pudb; Chapter 8:Quality Assurance; Introduction; Installing Pyflakes; Performing static analysis with Pyflakes; Analyzing code with Pylint; Performing static analysis with Pychecker; Testing code with docstrings; Writing unit tests; Testing code with mocks

Testing the BDD wayChapter 9:Speed Up Code with Cython; Introduction; Installing Cython; Building a Hello World program; Using Cython with NumPy; Calling C functions; Profiling Cython code; Approximating factorials with Cython; Chapter 10:Fun with Scikits; Introduction; Installing scikits-learn; Loading an example dataset; Clustering Dow Jones stocks with scikits-learn; Installing scikits-statsmodels; Performing a normality test with scikits-statsmodels; Installing scikits-image; Detecting corners; Detecting edges; Installing Pandas; Estimating stock returns correlation with Pandas

Loading data as pandas objects from statsmodels

Sommario/riassunto

Written in Cookbook style, the code examples will take your Numpy skills to the next level. This book will take Python developers with basic Numpy skills to the next level through some practical recipes.