Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
NumPy Essentials

You're reading from   NumPy Essentials Boost your scientific and analytic capabilities in no time at all by discovering how to build real-world applications with NumPy

Arrow left icon
Product type Paperback
Published in Apr 2016
Publisher
ISBN-13 9781784393670
Length 156 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Jaidev Deshpande Jaidev Deshpande
Author Profile Icon Jaidev Deshpande
Jaidev Deshpande
 Chin Chin
Author Profile Icon Chin
Chin
Tanmay Dutta Tanmay Dutta
Author Profile Icon Tanmay Dutta
Tanmay Dutta
Shane Holloway Shane Holloway
Author Profile Icon Shane Holloway
Shane Holloway
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. An Introduction to NumPy 2. The NumPy ndarray Object FREE CHAPTER 3. Using NumPy Arrays 4. NumPy Core and Libs Submodules 5. Linear Algebra in NumPy 6. Fourier Analysis in NumPy 7. Building and Distributing NumPy Code 8. Speeding Up NumPy with Cython 9. Introduction to the NumPy C-API 10. Further Reading

Summary


In this chapter, we introduced you to yet another way of optimizing or integrating C/C++ code using the C-API provided by Python and NumPy. We explained the basic structure of the code and the additional boilerplate code, which a developer has to write in order to create an extension module. Afterwards, we created two functions that calculated the square of a number and mapped the square function from the math.h library to a Numpy Array. The intention here was to familiarize you with how to leverage numerical libraries written in C/C++ to create your own modules with a minimal rewriting of code. The scope for writing C code is much wider than what is described here; however, we hope that this chapter has given you the confidence to leverage the C-API if the need arises.

lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
NumPy Essentials
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 $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon