NumPy Cookbook 第二版英文版

所需积分/C币:10 2017-09-27 21:07:37 15.08MB PDF
3
收藏 收藏
举报

作者:Ivan Idris 出版时间:2015 页数:258 语言:English 格式:PDF
NumPy Cookbook Second Edition Copyright C 2015 Packt Publishing All rights reserved No part of this book may be reproduced stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information First published: October 2012 Second edition April 2015 Production reference: 1270415 Published by Packt Publishing Ltd Livery place 35 Livery Street Birmingham B3 2PB, UK SBN9781-78439-0945 www.packtpub.com Credits Au uthor Project Coordinator Ivan Idris Rashi khivansara Reviewers Proofreaders Ley e givon Maria gould Mark livings Commissioning Editor Monica amera mehta Graphic Acquisition Editors Abhinash Sahu Nadeem N. Bagban Owen roberts Production Coordinator Shantanu N. Zagado Content Development Editor Parita Khedekar Cover work Shantanu N. Agade Technical editors Utkarsha s Kadam Shiny Poojary Copy edito Vikrant phadke About the Author Ivan Idris has an MSc in experimental physics. his graduation thesis had a strong emphasis on applied computer science. After graduating, he worked for several companies as a Java developer, data warehouse developer, and Qa analyst. His main professional interests are business intelligence, big data, and cloud computing. Ivan enjoys writing clean, testable code and interesting technical articles. He is the author of NumPy Beginner's Guide, NumPy Cookbook, Python Data Analysis, and Learning NumPy, all by Packt Publishing. You can find moreinformationabouthimandafewNumpyexamplesathttp://ivanidris.net wordpress/ I would like to take this opportunity to thank the reviewers and the team at Packt Publishing for making this book possible. Also, thanks to my teachers, professors, and colleagues who taught me about science and programming ast but not least, I would like to acknowledge my parents, family, and friends for their support About the reviewers Lev e. Givon is a doctoral candidate and neurocomputing researcher at the department of electrical engineering in Columbia University, New York His research focuses on developing computational tools and techniques to study information processing and representation by neural circuits in the brain of the fruit fly. He is one of the developers of Neurokernel Ug.Cokernel. github. io), an open software framework written in Python for the emulation of the fruit fly brain on multiple graphics processing units Mark Livingstone started his career by working for many years in three international computer companies (which no longer exist) in engineering, support, programming, and training roles. He got tired of being made redundant. He then graduated from griffith University, Gold coast, Australia, in 2011 with a bachelor's in information technology In 2013, Mark received a B Info Tech(Hons) degree. He is currently a phD candidate, with his confirmation rapidly approaching. All of his research software is written in Python on a Mac system Mark enjoys mentoring students with special needs. He was the chairman of ieee in Griffith University's Gold Coast Student Branch. He volunteers as a qualified justice of peace at the local district courthouse. He is also a credit union director, and has completed 105 blood donations Lijun Xue is a developer of Theano, which is a Python library that allows you to define optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. He was a research assistant at Carnegie Mellon University doing research projects related to machine learning and data mining. He is a Pythonista and has passion towards machine learning and data mining. He is currently working on some deep learning research projects, which aims to solve image classification problems in university. You can know moreabouthimathttp://royxue.me/ www.packtpubcom Support files, eBooks, discount offers, and more Forsupportfilesanddownloadsrelatedtoyourbookpleasevisitwww.Packtpub.com Did you know that packt offers eBook versions of every book published, with pdF and ePub filesavailableyoUcanupgradetotheeBookversionatwww.Packtpub.comandasaprint book customer, you are entitled to a discount on the e Book copy. Get in touch with us at service@packtpub.comformoredetails Atwww.paCktpub.comyoucanalsoreadacollectionoffreetechnicalarticlessignup for a range of free newsletters and receive exclusive discounts and offers on Packt books and e books PACKTLIB https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books Why Subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser Free Access for packt account holders IfyouhaveanaccountwithPacktatwww.Packtpub.comyoucanusethistoaccess PacktLib today and view g entirely free books Simply use your login credentials for immediate access Table of contents Preface Chapter 1: Winding Along with IPython Introduction Installing IPython Using IPython as a shell Reading manual pages 112467 Installing matplotlib Running an IPython notebook Exporting an IPython notebook 11 Importing a web notebook Configuring a notebook server 23 1 Exploring the SymPy profile 16 Chapter 2: Advanced Indexing and Array concepts Introduction Installing SciPy 12 990 stalling PIL 22 Resizing images 23 Creating views and copies 26 Flipping lena 28 Fancy indexing 30 Indexing with a list of locations 32 Indexing with Booleans 34 Stride tricks for sudoku 36 Broadcasting arrays 39 Table of contents Chapter 3: Getting to Grips with Commonly Used Functions 3 Introduction 44 Summing Fibonacci numbers 44 Finding prime factors 48 Finding palindromic numbers 51 The steady state vector 53 Discovering a power law 58 Trading periodically on dips 62 Simulating trading at randol 65 Sieving integers with the Sieve of Eratosthenes 68 Chapter 4: Connecting NumPy with the Rest of the World 71 Introduction 71 Using the buffer protocol 72 Using the array interface 74 Exchanging data with MATLAB and octave 76 Installing RPy2 Interfacing with R 78 Installing JPype 79 Sending a NumPy array to JPype 80 Installing Google App Engine 81 Deploying the Num Py code on the Google cloud 83 Running the Num Py code in a PythonAnywhere web console 85 Chapter 5: Audio and Image Processing 87 Introduction 87 Loading images into memory maps 88 Combining images 92 Blurring images 95 Repeating audio fragments 98 Generating sounds 101 Designing an audio filter 104 Edge detection with the Sobel filter 106 Chapter 6: Special Arrays and Universal Functions 109 Introduction 109 Creating a universal function 109 Finding pythagorean triples 110 Performing string operations with chararray LL2 Creating a masked array 114 Ignoring negative and extreme values 116 Creating a scores table with a recarray function 119 Table of contents Chapter 7: Profiling and debugging 123 Introduction 123 Profiling with timeit 123 Profiling with IPython 126 Installing line_profiler 129 Profiling code with line_profiler 130 Profiling code with the cProfile extension 131 Debugging with IPython 133 Debugging with PuDB 136 Chapter 8: Quality Assurance 137 Introduction 137 Installing Pyflakes 138 Performing static analysis with Pyflakes 139 Analyzing code with Pylint 140 Performing static analysis with Pychecker 142 Testing code with docstrings 143 Writing unit tests 145 Testing code with mocks 149 Testing the BDD way 151 Chapter 9: Speeding Up code with Cython 155 Introduction 155 Installing cython 156 Building a Hello world program 156 Using Cython with NumPy 158 Calling c functions 160 Profiling the Cython code 162 Approximating factorials with Cython 165 Chapter 10: Fun with Scikits 169 Introduction 169 Installing scikit-learn 170 Loading an example dataset 170 Clustering Dow Jones stocks with scikits-learn 171 Installing statsmodels 176 Performing a normality test with statsmodels 176 Installing scikit-image 177 Detecting corners 178 Detecting edges 180 Installing pandas 181 Estimating correlation of stock returns with pandas 182 i

...展开详情
试读 127P NumPy Cookbook 第二版英文版
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
上传资源赚钱or赚积分
最新推荐
NumPy Cookbook 第二版英文版 10积分/C币 立即下载
1/127
NumPy Cookbook 第二版英文版第1页
NumPy Cookbook 第二版英文版第2页
NumPy Cookbook 第二版英文版第3页
NumPy Cookbook 第二版英文版第4页
NumPy Cookbook 第二版英文版第5页
NumPy Cookbook 第二版英文版第6页
NumPy Cookbook 第二版英文版第7页
NumPy Cookbook 第二版英文版第8页
NumPy Cookbook 第二版英文版第9页
NumPy Cookbook 第二版英文版第10页
NumPy Cookbook 第二版英文版第11页
NumPy Cookbook 第二版英文版第12页
NumPy Cookbook 第二版英文版第13页
NumPy Cookbook 第二版英文版第14页
NumPy Cookbook 第二版英文版第15页
NumPy Cookbook 第二版英文版第16页
NumPy Cookbook 第二版英文版第17页
NumPy Cookbook 第二版英文版第18页
NumPy Cookbook 第二版英文版第19页
NumPy Cookbook 第二版英文版第20页

试读结束, 可继续阅读

10积分/C币 立即下载 >