Python and HDF5

本文由用户“congzwaaaa4444”分享发布 更新时间:2020-03-16 22:39:42 举报文档

以下为《Python and HDF5》的无排版文字预览,完整格式请下载

下载前请仔细阅读文字预览以及下方图片预览。图片预览是什么样的,下载的文档就是什么样的。

www.it-ebooks.info www.it-ebooks.info Learn how to turn data into decisions. From startups to the Fortune 500, smart companies are betting on data-driven insight, seizing the opportunities that are emerging from the convergence of four powerful trends: n New methods of collecting, managing, and analyzing data n Cloud computing that offers inexpensive storage and flexible, on-demand computing power for massive data sets n Visualization techniques that turn complex data into images that tell a compelling story n Tools that make the power of data available to anyone Get control over big data and turn it into insight with O’Reilly’s Strata offerings. Find the inspiration and information to create new products or revive existing ones, understand customer behavior, and get the data edge. Visit oreilly.com/data to learn more. ©2011 O’Reilly Media, Inc. O’Reilly logo is a registered trademark of O’Reilly Media, Inc. www.it-ebooks.info www.it-ebooks.info Python and HDF5 Andrew Collette www.it-ebooks.info Python and HDF5 by Andrew Collette Copyright © 2014 Andrew Collette. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/ institutional sales department: *** or corporate@oreilly.com. Editors: Meghan Blanchette and Rachel Roumeliotis Production Editor: Nicole Shelby Copyeditor: Charles Roumeliotis Proofreader: Rachel Leach Indexer: WordCo Indexing Services Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrator: Kara Ebrahim November 2013: First Edition Revision History for the First Edition: 2013-10-18: First release See http://oreilly.com/catalog/errata.csp?isbn=***67831 for release details. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Python and HDF5, the images of Parrot Crossbills, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade  mark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. ISBN: 978-1-449-36783-1 [LSI] www.it-ebooks.info Table of Contents Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi 1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Python and HDF5 2 Organizing Data and Metadata 2 Coping with Large Data Volumes 3 What Exactly Is HDF5? 4 HDF5: The File 5 HDF5: The Library 6 HDF5: The Ecosystem 6 2. Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 HDF5 Basics 7 Setting Up 8 Python 2 or Python 3? 8 Code Examples 9 NumPy 10 HDF5 and h5py 11 IPython 11 Timing and Optimization 12 The HDF5 Tools 14 HDFView 14 ViTables 15 Command Line Tools 15 Your First HDF5 File 17 Use as a Context Manager 18 File Drivers 18 v www.it-ebooks.info The User Block 19 3. Working with Datasets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Dataset Basics 21 Type and Shape 21 Reading and Writing 22 Creating Empty Datasets 23 Saving Space with Explicit Storage Types 23 Automatic Type Conversion and Direct Reads 24 Reading with astype 25 Reshaping an Existing Array 26 Fill Values 26 Reading and Writing Data 27 Using Slicing Effectively 27 Start-Stop-Step Indexing 29 Multidimensional and Scalar Slicing 30 Boolean Indexing 31 Coordinate Lists 32 Automatic Broadcasting 33 Reading Directly into an Existing Array 34 A Note on Data Types 35 Resizing Datasets 36 Creating Resizable Datasets 37 Data Shuffling with resize 38 When and How to Use resize 39 4. How Chunking and Compression Can Help You. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Contiguous Storage 41 Chunked Storage 43 Setting the Chunk Shape 45 Auto-Chunking 45 Manually Picking a Shape 45 Performance Example: Resizable Datasets 46 Filters and Compression 48 The Filter Pipeline 48 Compression Filters 49 GZIP/DEFLATE Compression 50 SZIP Compression 50 LZF Compression 51 Performance 51 Other Filters 52 SHUFFLE Filter 52 vi | Table of Contents www.it-ebooks.info FLETCHER32 Filter 53 Third-Party Filters 54 5. Groups, Links, and Iteration: The “H” in HDF5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 The Root Group and Subgroups 55 Group Basics 56 Dictionary-Style Access 56 Special Properties 57 Working with Links 57 Hard Links 57 Free Space and Repacking 59 Soft Links 59 External Links 61 A Note on Object Names 62 Using get to Determine Object Types 63 Using require to Simplify Your Application 64 Iteration and Containership 65 How Groups Are Actually Stored 65 Dictionary-Style Iteration 66 Containership Testing 67 Multilevel Iteration with the Visitor Pattern 68 Visit by Name 68 Multiple Links and visit 69 Visiting Items 70 Canceling Iteration: A Simple Search Mechanism 70 Copying Objects 71 Single-File Copying 71 Object Comparison and Hashing 72 6. Storing Metadata with Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Attribute Basics 75 Type Guessing 77 Strings and File Compatibility 78 Python Objects 80 Explicit Typing 80 Real-World Example: Accelerator Particle Database 82 Application Format on Top of HDF5 82 Analyzing the Data 84 7. More About Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 The HDF5 Type System 87 Integers and Floats 88 Table of Contents | vii www.it-ebooks.info Fixed-Length Strings 89 Variable-Length Strings 89 The vlen String Data Type 90 Working with vlen String Datasets 91 Byte Versus Unicode Strings 91 Using Unicode Strings 92 Don’t Store Binary Data in Strings! 93 Future-Proofing Your Python 2 Application 93 Compound Types 93 Complex Numbers 95 Enumerated Types 95 Booleans 96 The array Type 97 Opaque Types 98 Dates and Times 99 8. Organizing Data with References, Types, and Dimension Scales. . . . . . . . . . . . . . . . . . 101 Object References 101 Creating and Resolving References 101 References as “Unbreakable” Links 102 References as Data 103 Region References 104 Creating Region References and Reading 104 Fancy Indexing 105 Finding Datasets with Region References 106 Named Types 106 The Datatype Object 107 Linking to Named Types 107 Managing Named Types 108 Dimension Scales 108 Creating Dimension Scales 109 Attaching Scales to a Dataset 110 9. Concurrency: Parallel HDF5, Threading, and Multiprocessing. . . . . . . . . . . . . . . . . . . . . 113 Python Parallel Basics 113 Threading 114 Multiprocessing 116 MPI and Parallel HDF5 119 A Very Quick Introduction to MPI 120 MPI-Based HDF5 Program 121 Collective Versus Independent Operations 122 viii | Table of Contents www.it-ebooks.info Atomicity Gotchas 123 10. Next Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 内容过长,仅展示头部和尾部部分文字预览,全文请查看图片预览。 Once the chicks have hatched, they live in the nest for about a month before starting out on their own. Due to its large geographic range and stable population numbers, the Parrot Crossbill is not considered endangered or threatened in any way. The cover images are from Wood’s Animate Creation. The cover fonts are URW Type  writer and Guardian Sans. The text font is Adobe Minion Pro; the heading font is Adobe Myriad Condensed; and the code font is Dalton Maag’s Ubuntu Mono. www.it-ebooks.info [文章尾部最后500字内容到此结束,中间部分内容请查看底下的图片预览]请点击下方选择您需要的文档下载。

  1. 1.Proportional Fai_省略_ Statistical CSI_Yonghai Lin
  2. OMAN AS A FUTURE LOGISTICS HUB A CONCEPTUAL STUDY
  3. 7000雅思词汇用100个句子记完
  4. 论死亡-培根
  5. Batch Job - AAAU - AU001b - BO Accepted STD Pick R
  6. Python and HDF5
  7. 词汇手册139-144
  8. 1-s2.0-S***00066-main (2)
  9. Cooling Relief of Acute and Chronic Itch Requires
  10. Full_Paper_Template
  11. 5 Steps to a 5 - AP Economics
  12. 托福听力学科分类(完全修正版)
  13. 02写作强化20大必背范文-英语二
  14. 1-s2.0-S******-main
  15. 4425
  16. Principles+of+Psychotherapy
  17. team 10 work
  18. Deep Manifold Embedding for Hyperspectral Image Cl
  19. ***
  20. 工业互联与5G

以上为《Python and HDF5》的无排版文字预览,完整格式请下载

下载前请仔细阅读上面文字预览以及下方图片预览。图片预览是什么样的,下载的文档就是什么样的。

图片预览