Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Python Data Visualization

You're reading from  Mastering Python Data Visualization

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781783988327
Pages 372 pages
Edition 1st Edition
Languages

Table of Contents (16) Chapters

Mastering Python Data Visualization
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. A Conceptual Framework for Data Visualization 2. Data Analysis and Visualization 3. Getting Started with the Python IDE 4. Numerical Computing and Interactive Plotting 5. Financial and Statistical Models 6. Statistical and Machine Learning 7. Bioinformatics, Genetics, and Network Models 8. Advanced Visualization Go Forth and Explore Visualization Index

Slicing


Arrays can be sliced just like lists and tuples. Array slicing is identical to list slicing, except that the syntax is simpler. Arrays are sliced using the [ : , :, ... :] syntax, where the number of dimensions of the arrays determine the size of the slice, except that these dimensions for which slices are omitted, all elements are selected. For example, if b is a three-dimensional array, b[0:2] is the same as b[0:2,:,:]. There are shorthand notations for slicing. Some common ones are:

  • : and: are the same as 0:n:1, where n is the length of the array

  • m: and m:n: are the same as m:n:1, where n is the length of the array

  • :n: is the same as 0:n:1

  • ::d: is the same as 0:n:d, where n is the length of the array

All these slicing methods have been referenced with the usage of arrays. This can also be applicable to lists. Slicing of one-dimensional arrays is identical to slicing a simple list (as one-dimensional arrays can be seen equivalent to a list), and the returned type of all the slicing...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}