Python Scripting For Computational Science

E-Book Overview

Numerous readers of the second edition have noti?ed me about misprints and possible improvements of the text and the associated computer codes. The resulting modi?cations have been incorporated in this new edition and its accompanying software. The major change between the second and third editions, however, is caused by the new implementation of Numerical Python, now called numpy. The new numpy package encourages a slightly di?erent syntax compared to the old Numeric implementation, which was used in the previous editions. Since Numerical Python functionality appears in a lot of places in the book, there are hence a huge number of updates to the new suggested numpy syntax, especially in Chapters 4, 9, and 10. The second edition was based on Python version 2.3, while the third edition contains updates for version 2.5. Recent Python features, such as generator expressions (Chapter 8.9.4), Ctypes for interfacing shared libraries in C (Chapter 5.2.2), the with statement (Chapter 3.1.4), and the subprocess module for running external processes (Chapter 3.1.3) have been exempli?ed to make the reader aware of new tools. Chapter 4.4.4 is new and gives a taste of symbolic mathematics in Python.


E-Book Content

Texts in Computational Science and Engineering Editors Timothy J. Barth Michael Griebel David E. Keyes Risto M. Nieminen Dirk Roose Tamar Schlick 3 Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures 123 Hans Petter Langtangen Simula Research Laboratory Martin Linges vei 17, Fornebu P.O. Box 134 1325 Lysaker, Norway [email protected] On leave from: Department of Informatics University of Oslo P.O. Box 1080 Blindern 0316 Oslo, Norway http://folk.uio.no/hpl The author of this book has received financial support from the NFF – Norsk faglitterær forfatter- og oversetterforening. ISBN 978-3-540-73915-9 e-ISBN 978-3-540-73916-6 DOI 10.1007/978-3-540-73916-6 Texts in Computational Science and Engineering ISSN 1611-0994 Library of Congress Control Number: 2007940499 Mathematics Subject Classification (2000): 65Y99, 68N01, 68N15, 68N19, 68N30, 97U50, 97U70 © 2008, 2006, 2004 Springer-Verlag Berlin Heidelberg This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilm or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable to prosecution under the German Copyright Law. The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. Typesetting: by the author using a Springer TEX macro package Cover design: WMX Design GmbH, Heidelberg Production: LE-TEX Jelonek, Schmidt & Vöckler GbR, Leipzig Printed on acid-free paper 9 87654321 springer.com Preface to the Third Edition Numerous readers of the second edition have notified me about misprints and possible improvements of the text and the associated computer codes. The resulting modifications have been incorporated in this new edition and its accompanying software. The major change between the second and third editions, however, is caused by the new implementation of Numerical Python, now called numpy. The new nu
You might also like

Computer Science Handbook
Authors: Allen B. Tucker    172    0





The Curve Shortening Problem
Authors: Kai-Seng Chou , Xi-Ping Zhu    119    0


Coding Theory - Algorithms, Architectures, And Applications
Authors: Andre Neubauer , Jurgen Freudenberger , Volker Kuhn    107    0


Advanced Modelling In Finance Using Excel And Vba
Authors: Mary Jackson , Mike Staunton    112    0


Optimization Theory And Methods: Nonlinear Programming
Authors: Wenyu Sun , Ya-Xiang Yuan    144    0



Core J2ee Patterns
Authors: Deepak Alur , John Crupi , Dan Malks    102    0