Files
cantera/interfaces/python/Cantera/num.py
Ray Speth 6cb4bd93ce Cleaned up whitespace in all Python files using reindent.py
4 spaces per indentation level, no tabs, no trailing whitespace,
and a single newline at end of each file.
2012-02-27 18:13:05 +00:00

37 lines
1.0 KiB
Python

import _cantera
nummodule = None
try:
if _cantera.nummod == 'numpy':
import numpy
nummodule = numpy
elif _cantera.nummod == 'numarray':
import numarray
nummodule = numarray
else:
import Numeric
nummodule = Numeric
except:
print """
ERROR: """+_cantera.nummod+""" not found!
Cantera uses a set of numerical extensions to Python, but these do
not appear to be present on your system. To install the required
package, go to http://sourceforge.net/projects/numpy, and install
either the """+_cantera.nummod+""" package for your system. If you are
using a Windows system, use the binary installer to install the
selected package for you automatically.
"""
raise "could not import "+_cantera.nummod
zeros = nummodule.zeros
array = nummodule.array
asarray = nummodule.asarray
transpose = nummodule.transpose
ravel = nummodule.ravel
shape = nummodule.shape
ones = nummodule.ones
log10 = nummodule.log10