Version 1.0b1 API Documentation generated by Endo 2006-08-14
This module converts code written for Numeric to run with numpy Makes the following changes: * Converts typecharacters * Changes import statements (warns of use of from Numeric import *) * Changes import statements (using numerix) ... * Makes search and replace changes to: - .typecode() - .iscontiguous() - .byteswapped() - .itemsize() * Converts .flat to .ravel() except for .flat = xxx or .flat[xxx] * Change typecode= to dtype= * Eliminates savespace=xxx * Replace xxx.spacesaver() with True * Convert xx.savespace(?) to pass + ## xx.savespace(?) #### -- not * Convert a.shape = ? to a.reshape(?) * Prints warning for use of bool, int, float, copmlex, object, and unicode * replaces matrixmultiply with dot
flatindex_re = re.compile('([.]flat(\\s*?[[=]))')
svspc = re.compile('(\\S+\\s*[(].+),\\s*savespace\\s*=.+\\s*[)]')
svspc2 = re.compile('([^,(\\s]+[.]spacesaver[(][)])')
svspc3 = re.compile('(\\S+[.]savespace[(].*[)])')
Convert all .py files to use NumPy (from Numeric) in the directory given
For each file, a backup of <usesnumeric>.py is made as <usesnumeric>.py.orig. A new file named <usesnumeric>.py is then written with the updated code.
Convert the filename given from using Numeric to using NumPy
Copies the file to filename.orig and then over-writes the file with the updated code
| Local name | Refers to |
|---|---|
| datetime | datetime |
| glob | glob |
| os | os |
| re | re |
| sys | sys |