Blog Archives

Physical constants and factorials

The previous post mentioned that Avogadro’s constant is approximately 24!. Are there other physical constants that are nearly factorials?

Tagged with: , ,
Posted in Python

Python for high performance computing

William Scullin’s talk from PyCon 2011: Python for high performance computing. At least in our shop [Argonne National Laboratory] we have three accepted languages for scientific computing. In this order they are C/C++, Fortran in all its dialects, and Python.

Tagged with: ,
Posted in Python

Scientific Python on Twitter

Next week I’m starting a new daily tip Twitter account: @SciPyTip. This account will post on things related to scientific computing in Python, including the SciPy library, related software, and scientific computing in general. Full list of daily tip accounts

Tagged with: , ,
Posted in Python

Ruby, Python, and Science

David Jacobs has written a long blog post Ruby is beautiful (but I’m moving to Python). Here’s my summary. Ruby is much better than Java, but the Ruby community is too focused on web development and the language has no

Tagged with: , ,
Posted in Python

Bug in SciPy’s erf function

Last night I produced the plot below and was very surprised at the jagged spike. I knew the curve should be smooth and strictly increasing. My first thought was that there must be a numerical accuracy problem in my code,

Tagged with: , , ,
Posted in Python, Software development

Replacing Mathematica with Python

Everything I do regularly in Mathematica can be done in Python. Even though Mathematica has a mind-boggling amount of functionality, I only use a tiny proportion of it. I skimmed through some of my Mathematica files to see what functions

Tagged with: , ,
Posted in Python

SciPy and NumPy for .NET

Travis Oliphant announced this morning at the SciPy 2010 conference that Microsoft is partnering with Enthought to produce a version of NumPy and SciPy for .NET. NumPy and SciPy are Python libraries for scientific computing. Oliphant is the president of

Tagged with: , ,
Posted in Python

Using py2exe with SciPy

py2exe is a program that takes Python code and produces a Windows executable that can run on computers that do not have Python installed. My focus here is in using py2exe on Python code that depends on SciPy.

Tagged with: ,
Posted in Python

Python code for computing distribution parameters from percentiles

A few days ago I wrote a post on finding parameters so that a probability distribution satisfies two percentile conditions. Since then I’ve written Python code to carry out the calculations described in that article and the accompanying technical report.

Tagged with: ,
Posted in Math, Python

Probability distribution parameterizations in SciPy

Parameterizations are the bane of statistical software. One of the most common errors is to assume that one software package uses the same parameterization as another package. For example, some packages specify the exponential distribution in terms of the mean

Tagged with: , ,
Posted in Python, Software development, Statistics

Getting started with SciPy (Scientific Python)

CodeProject just published my article Getting Started with SciPy (Scientific Python)

Tagged with: ,
Posted in Python

IEEE floating point arithmetic in Python

Sometimes a number is not a number. Numeric data types represent real numbers in a computer fairly well most of the time, but sometimes the abstraction leaks. The sum of two numeric types is always a numeric type, but the

Tagged with: , ,
Posted in Math, Python

Probability distributions in SciPy

Here are some notes on how to work with probability distributions using the SciPy numerical library for Python. Functions related to probability distributions are located in scipy.stats. The general pattern is scipy.stats.<distribution family>.<function> There are 81 supported continuous distribution families

Tagged with: , ,
Posted in Python

Numerical computing in IronPython with Ironclad

In a previous post, I discuss my difficulties calling some Python modules from IronPython. In particular I wanted to call SciPy from IronPython and couldn’t. The discussion following that post brought up Ironclad as a possible solution. I wanted to

Tagged with: , , , ,
Posted in Python, Software development

Comparing statistical packages: R, SAS, SPSS, etc.

Interesting post from Brendan O’Connor: Comparison of data analysis packages: R, Matlab, SciPy, Excel, SAS, SPSS, Stata

Tagged with: ,
Posted in Statistics