%% LyX 1.3 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{geometry}
\geometry{verbose,letterpaper,tmargin=1in,bmargin=1in,lmargin=1.25in,rmargin=1.25in}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength\parskip{\medskipamount}
\setlength\parindent{0pt}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{amssymb}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{ae,aecompl}
%\usepackage{hyperref}
\usepackage{html}
\usepackage{color}
% Use and configure listings package for nicely formatted code
\usepackage{listings}
\lstset{
language=Python,
basicstyle=\small,
commentstyle=\color{blue},
stringstyle=\ttfamily,
showstringspaces=false,
% frame=single,
emph = {axes, axis, bar, cla, clf, clim, close, cohere, colorbar,
colors, csd, draw, errorbar, figimage, figlegend, figtext, figure,
fill, gca, gcf, gci, get, get_current_fig_manager,
get_plot_commands, gray, grid, hist, hlines, hold, imshow, jet,
legend, load, loglog, pcolor, pcolor_classic, plot, plot_date,
plotting, psd, raise_msg_to_str, rc, rcdefaults, save, savefig,
scatter, scatter_classic, semilogx, semilogy, set, specgram, stem,
subplot, table, text, title, vlines, xlabel, ylabel},
emphstyle = \color{black}, % color for matplotlib funcs
breaklines=true,
% breakatwhitespace = true,
postbreak = \space\dots
}
% Some extra commands
\newcommand{\fig}[4]
{\begin{figure}[ht]
\begin{center}
\includegraphics[width=#1]{#2}
\caption{\label{#4} #3}
\end{center}
\end{figure}}
\newcommand{\matlab}[0]{matlab{\texttrademark}}
\newcommand{\fname}[1]{{\tt #1}}
\newcommand{\func}[1]{{\tt #1}}
\newcommand{\class}[1]{{\tt #1}}
\newcommand{\mpldoc}[1]{{\tt #1}}
\newcommand{\code}[1]{{\tt #1}}
\newcommand{\prompt}[1]{\code{>>> #1}}
\newcommand{\carg}[1]{\textit{#1}} % command argument
\newcommand{\val}[1]{\textit{#1}}
\newcommand{\rc}[1]{{\tt #1}}
\usepackage{babel}
\makeatother
\begin{document}
\title{Python and Scientific Computing\\
{\Large Notes}}
\author{John D. Hunter\\
Fernando Perez}
\maketitle
\latex{\tableofcontents{}}
\html{\bodytext{bgcolor=#ffffff}}
\newpage
\section{Overview}
Blah blah \cite{IPython,JDH04,MayaVi,PMV,PYTHON,SciPy,f2py}
\section{Some code examples}
A code listing
\lstinputlisting{code/WallisPi.py}
\section{Another example}
A long listing
\lstinputlisting{code/weave_examples.py}
And we can also have a figure of a person's head, as shown in Fig.~\ref{fig:mayavi-head}.%
%\begin{figure}
%\begin{center}\includegraphics[%
% width=0.80\textwidth]{fig/skin.gif}\end{center}
%\caption{\label{fig:mayavi-head}Somebody's head}
%\end{figure}
\bibliographystyle{plain}
\bibliography{python}
\end{document}