Python for Scientists and Engineers

Class Overview

Python for Scientists and Engineers

This class is intended for the scientist or engineer interested in using Python for their day-to-day computational tasks.

  • It begins with a one-day introduction to the Python language focusing on standard data structures, control constructs, and code organization.
  • After a brief overview of the Scientific Python ecosystem, we dive into techniques for numeric data processing, including efficiently manipulating and processing large data sets using NumPy arrays and data visualization with 2D plots using Matplotlib.
  • Next up is an introduction to time series and data wrangling with Pandas.
  • The fourth day covers the necessary tools to write robust and efficient Python code: a unit test framework, the Python debugger, and more. The second half presents how to create interfaces between Python and other languages such as C and C++.
  • The week wraps up on day five with a one-day module on building scientific Graphical User Interfaces (GUIs).

Course Syllabus

Days 1 - 3

Introduction to Python

The introduction to Python focuses on how to think in Python. We start by demonstrating the IPython interactive environment and how it can be used for rapid application development. The pace is determined by students' previous exposure to Python. Even experienced Python programmers report learning new ideas from the experts that teach this class.

  • Data-Types (strings, lists, dictionaries and more)
  • Control Flow (if-then statements, looping)
  • Organizing code (functions, modules, packages)
  • Reading and writing files
  • Overview of Object-Oriented Programming (OOP)

Introduction to NumPy and 2D plotting

The NumPy package is presented as a tool for rapidly manipulating and processing large data sets. 2D plotting is introduced with matplotlib.

  • Plotting with matplotlib
  • Understanding the N-dimensional data structure
  • Creating arrays
  • Indexing arrays by slicing or more generally with indices or masks
  • Basic operations and manipulations on N-dimensional arrays

Time series analysis and data manipulation with pandas

Built on top of NumPy arrays, the Python Data Analysis Library (Pandas) is a powerful and convenient package for dealing with multi-dimensional datasets. Participants will learn about its powerful data aggregation and reorganization capabilities for data set explorations, including support for labeling data along each dimension, missing values, and time series manipulations.

  • Pandas I/O operations
  • Pandas' 1D and 2D data structures (Series and DataFrame)
  • Data alignment, aggregation and summarization
  • Computation and analysis with Pandas
  • Dealing with dates and times
  • Visualization

Day 4

Software Craftsmanship in Python

We review important concepts from software engineering and place them in the context of coding in Python. Participants will receive guidance and gain experience to help improve the quality, robustness and reliability of their code and develop solutions faster.

  • Python coding standards and organization
  • Testing code
  • Timing execution and profiling tools
  • Debugging
  • Monitoring execution

Interfacing with Other Languages

One of Python's most powerful features is its ability to integrate seamlessly with other languages such as C and C++. In this module, you will learn how to use tools for integrating Python with legacy code in C/C++ as well as optimizing new Python code with compiled modules. Key topics include:

  • Integration of C/C++ code into Python
  • C-extension: wrapping C code by hand
  • Calling arbitrary shared-libraries with ctypes
  • Wrapping external C/C++ libraries with Cython
  • Speeding up Python with Cython
  • Note: An overview of interfacing with Fortran is available upon request.

Day 5

Scientific GUIs and Interactive 2D/3D Visualization

Day five provides an overview of creating graphical UIs and visualization applications using Traits and Chaco. Participants will also learn to quickly visualize data in 3D with Mayavi.

Students will learn to drive their code with a visual interface: They will build basic Graphical User Interfaces with drop-down menus, buttons, checkboxes, and other GUI widgets and create simple interactive 2D visualizations with Chaco to provide a more fluid user workflow. Finally, students will learn how to extend such interfaces. Key topics include:

Building GUIs with Traits
  • Creating reactive classes with initialization, validation, delegation, and notification
  • Building a graphical view of a Traits class
  • Organizing GUIs following the Model / View / Controller pattern

Interactive 2D visualization with Chaco
  • Integration into Traits UI
  • Scatter and line plots
  • Image plots
  • Containers for layout
  • Simple tool creation for event handling
  • Introduction to overlays

Interactive 3D visualization with Mayavi
  • Interactive 3D plotting from IPython using mlab
  • Overview of Mayavi's capabilities

Python for Scientists and Engineers Class Schedule

For inquiries or to register call 512.536.1057

Los Alamos, NM
Aug 14-18, 2017
Albuquerque, NM
Sept 11-15, 2017
Washington, DC
Sept 25-29, 2017
Los Alamos, NM
Oct 2-6, 2017
Cambridge, UK
Oct 16-20, 2017
San Diego, CA
Oct 30-Nov 3, 2017
Albuquerque, NM
Nov 13-17, 2017
Los Alamos, NM
Dec 4-8, 2017
Austin, TX
Dec 11-15, 2017

Discounts are available for 3+ attendees, and corporate training options are also available. Contact us or call 512.536.1057 for more information.

A 20% discount is available for academics currently at a degree-granting institution. Contact us at 512.536.1057 to register.


Experience with Python is helpful (but not required). However, programming experience in some language (such as R, MATLAB, SAS, Mathematica, Java, C, C++, VB, or FORTRAN) is expected. In particular, participants need to be comfortable with general programming concepts like variables, loops, and functions.


“Great course for the scientific programmer who'd like to delve deeper into Python and gain a good introduction to some of the Python tools out there catering to science/engineering applications. It was great to learn from people with extensive experience in both the development of some of those tools, and their application to solve real-world problems across diverse fields and sectors.” Michael W.
Post-doctoral fellow

“As a scientist/algorithm developer coming to Python, I was a little bewildered by the wealth of Python libraries available, not to mention legacy/deprecated ones. Enthought has a huge amount of Python expertise and this course gave an excellent overview of key elements of the Python tool stack, from base Python through to creating a GUI. From this course I feel I've gained a good appreciation of how to go about building a Python application that performs, for example, scientific data processing and visualization.” Guy M.
Senior Data Scientist
(Electronics Manufacturing / Pharmaceuticals)

“This course was extremely useful in clearly teaching best practices in Python. I had experience with Python before the course, but I now know how best to fix existing scripts and move forward with Python in the best way possible.” Ryan S.
Computational Engineer
(National Research Laboratory)

“This class went beyond expectations. The instructor was a wealth of knowledge and truly showcased what can be done with Python and Canopy in an easy to follow manner.” Ming H.
Test Engineer

“The course was dense yet easy to follow. I wish all my university professors were as good, skilled and professional as our instructor.” Yorick C.
Masters student

See more testimonials