PaREnTranslatorPlugins (version 0.1)
index
/home1/alod/CODED/SVN/TMB_PaREn/PaREnTranslatorPlugins.py

#=======================================================================================================
#PaREn Translator Plugins
#
#In this module you find functions for registering Import and Export PaREnData Plugins.
#This module has been separated out from the ExCoLib and is an independent module now. References
#to PaREnUtility and PaREnStatus have been removed.
#Instead if logging errors the module now crashes by exceptions.
#=======================================================================================================

 
Modules
       
numpy.add_newdocs
numpy.core.defchararray
scipy.cluster
csv
numpy.ctypeslib
numpy.lib.scimath
scipy.fftpack
scipy.integrate
scipy.interpolate
scipy.io
scipy.lib
scipy.linalg
scipy.linsolve
numpy.core.ma
math
scipy.maxentropy
scipy.misc
scipy.ndimage
numpy.oldnumeric
scipy.optimize
numpy.random
numpy.core.records
scipy.signal
scipy.sparse
scipy.special
scipy.stats
_xmlplus

 
Classes
       
Plugin
CSVPlugin
MATPlugin
RPlugin
SVMPlugin
XMLPlugin
TranslatorPlugins

 
class CSVPlugin(Plugin)
    #=======================================================================================================
#CLASS CSVPlugin
#An CSV Plugin class. Supports Import and Export from and to CSV format.
#=======================================================================================================
 
  Methods defined here:
Export(self, Stream, Data, Options={})
#===================================================================================================
#Class CSVPlugins 
#Export()
#Exports data to an CSV file 
#Parameter                      :       Stream  (filename or an object of an opened file)
#                                       :       Data    (Data to be exported)
#NOTE: this function is using Stream and expects an object of an opened file
#===================================================================================================
Import(self, Stream, Options={})
#===================================================================================================
#Class CSVPlugins 
#Import()
#Imports data from an CSV file and returns an array of dictionary items having Vectors, Labels and 
#Probabilities. A dictionary entry will be 'None' if corresponding Data is not available in the CSV
#Parameter                      :       Stream  (filename or an object of an opened file)
#Returns                        :       An array of dictionary values having Vectors, Labels and Probabilities
#===================================================================================================
__init__(self)
#===================================================================================================
#Class CSVPlugins 
#CONSTRUCTOR
#===================================================================================================

Methods inherited from Plugin:
CanExport(self)
#===================================================================================================
#Class Plugin
#CanExport()
#Returns        :       self.MyCanExport
#===================================================================================================
CanImport(self)
#===================================================================================================
#Class Plugin
#CanImport()
#Returns        :       self.MyCanImport
#===================================================================================================
ExportOptions(self)
#===================================================================================================
#Class Plugin
#ExportOptions()
#RETURNS DICT
#Returns a dictionary with default options for exporting
#===================================================================================================
ImportOptions(self)
#===================================================================================================
#Class Plugin
#ImportOptions()
#RETURNS DICT
#Returns a dictionary with default options for importing
#===================================================================================================
Name(self)
#===================================================================================================
#Class Plugin
#Name()
#Returns        :       self.MyName
#===================================================================================================

Data and other attributes inherited from Plugin:
MultiCompleteData = 1
MultiRestrictedData = 3
NoCapability = 0
SingleCompleteData = 2
SingleRestrictedData = 4

 
class MATPlugin(Plugin)
    #=======================================================================================================
#CLASS MATPlugin
#A MAT Plugin class. Supports Import and Export from and the MATLAB format.
#=======================================================================================================
 
  Methods defined here:
Export(self, Stream, Data, Options={})
#===================================================================================================
#Class MATPlugin
#Export()
#RETURNS 1/0 (SUCCESS/FAILURE)
#Exports data to a Matlab file. Only supports single data sets.
#Stream                         :       Stream  (filename or an object of an opened file)
#Options                        :       Dictionary with optional values
#===================================================================================================
Import(self, Stream, Options={})
#===================================================================================================
#Class MATPlugin
#Import()
#Imports data from a MAT file and returns an array of dictionary items having Vectors, Labels and 
#Probabilities. A dictionary entry will be 'None' if corresponding Data is not available.
#Stream                         :       Stream  (filename or an object of an opened file)
#Options                        :       Dictionary with optional values
#===================================================================================================
__init__(self)
#===================================================================================================
#Class MATPlugin
#CONSTRUCTOR
#===================================================================================================

Methods inherited from Plugin:
CanExport(self)
#===================================================================================================
#Class Plugin
#CanExport()
#Returns        :       self.MyCanExport
#===================================================================================================
CanImport(self)
#===================================================================================================
#Class Plugin
#CanImport()
#Returns        :       self.MyCanImport
#===================================================================================================
ExportOptions(self)
#===================================================================================================
#Class Plugin
#ExportOptions()
#RETURNS DICT
#Returns a dictionary with default options for exporting
#===================================================================================================
ImportOptions(self)
#===================================================================================================
#Class Plugin
#ImportOptions()
#RETURNS DICT
#Returns a dictionary with default options for importing
#===================================================================================================
Name(self)
#===================================================================================================
#Class Plugin
#Name()
#Returns        :       self.MyName
#===================================================================================================

Data and other attributes inherited from Plugin:
MultiCompleteData = 1
MultiRestrictedData = 3
NoCapability = 0
SingleCompleteData = 2
SingleRestrictedData = 4

 
class Plugin
    #=======================================================================================================
#CLASS Plugins
#It is the Base class for all the format classes.
#=======================================================================================================
 
  Methods defined here:
CanExport(self)
#===================================================================================================
#Class Plugin
#CanExport()
#Returns        :       self.MyCanExport
#===================================================================================================
CanImport(self)
#===================================================================================================
#Class Plugin
#CanImport()
#Returns        :       self.MyCanImport
#===================================================================================================
Export(self, Stream, Data, Options={})
#===================================================================================================
#Class Plugin
#Export()
#It will be called only when the derived class does not have the capability to Export the format. It
#will generate a warning to notify user about unavailability of Export Function.
#Returns        :       None
#===================================================================================================
ExportOptions(self)
#===================================================================================================
#Class Plugin
#ExportOptions()
#RETURNS DICT
#Returns a dictionary with default options for exporting
#===================================================================================================
Import(self, Stream, Options={})
#===================================================================================================
#Class Plugin
#Import()
#It will be called only when the derived class does not have the capability to Import the format. It
#will generate a warning to notify user about unavailability of Import Function.
#Returns        :       None
#===================================================================================================
ImportOptions(self)
#===================================================================================================
#Class Plugin
#ImportOptions()
#RETURNS DICT
#Returns a dictionary with default options for importing
#===================================================================================================
Name(self)
#===================================================================================================
#Class Plugin
#Name()
#Returns        :       self.MyName
#===================================================================================================
__init__(self, Name, CanImport, CanExport)
#===================================================================================================
#Class Plugin
#CONSTRUCTOR
#Registers the plugin
#Parameter              :       Name    (Name of the format, string)
#                               :       CanImport       (Import Functionality available, 1 = Available, 0 = Not Available)
#                               :       CanExport       (Export Functionality available, 1 = Available, 0 = Not Available)
#===================================================================================================

Data and other attributes defined here:
MultiCompleteData = 1
MultiRestrictedData = 3
NoCapability = 0
SingleCompleteData = 2
SingleRestrictedData = 4

 
class RPlugin(Plugin)
    #=======================================================================================================
#CLASS RPlugin
#=======================================================================================================
 
  Methods defined here:
Export(self, Stream, Data, Options={})
#===================================================================================================
#CLASS RPlugin
#FUNCTION Export( Stream, Data, Options )
#RETURNS 1/0
#Exports data into an R script. Invoke source( 'filename.R' ) in order to execute it.
#Call "Imported" on the command line of R in order to find out which variables got imported.
#Stream         : FILE or other STREAM. Target file for R content.
#Data           : LIST OF DICTS. List of dictionaries containing the data from a translator. (or CreateData())
#Options        : DICT. Eventual options for the export functions. This one doesn't have any.
#===================================================================================================
__init__(self)
#===================================================================================================
#CLASS RPlugin
#CONSTRUCTOR
#===================================================================================================

Methods inherited from Plugin:
CanExport(self)
#===================================================================================================
#Class Plugin
#CanExport()
#Returns        :       self.MyCanExport
#===================================================================================================
CanImport(self)
#===================================================================================================
#Class Plugin
#CanImport()
#Returns        :       self.MyCanImport
#===================================================================================================
ExportOptions(self)
#===================================================================================================
#Class Plugin
#ExportOptions()
#RETURNS DICT
#Returns a dictionary with default options for exporting
#===================================================================================================
Import(self, Stream, Options={})
#===================================================================================================
#Class Plugin
#Import()
#It will be called only when the derived class does not have the capability to Import the format. It
#will generate a warning to notify user about unavailability of Import Function.
#Returns        :       None
#===================================================================================================
ImportOptions(self)
#===================================================================================================
#Class Plugin
#ImportOptions()
#RETURNS DICT
#Returns a dictionary with default options for importing
#===================================================================================================
Name(self)
#===================================================================================================
#Class Plugin
#Name()
#Returns        :       self.MyName
#===================================================================================================

Data and other attributes inherited from Plugin:
MultiCompleteData = 1
MultiRestrictedData = 3
NoCapability = 0
SingleCompleteData = 2
SingleRestrictedData = 4

 
class SVMPlugin(Plugin)
    #=======================================================================================================
#CLASS SVMPlugin
#An SVM Plugin class. Supports only Export to svmlight format which is also used by svmlib.
#=======================================================================================================
 
  Methods defined here:
Export(self, Stream, Data, Options={})
#===================================================================================================
#Class SVMPlugin
#Export()
#RETURNS 1/0
#Exports a single data set into a stream so that it can be read by SVMligh and SVMlib. If Plus
#and Minus options are not supplied, then arbitrary class is taken to +1 and the rest is -1.
#You can supply either Plus or Minus or both. If you supply Plus or Minus only, the opposite
#class consists of the complimentary ClassIDs. If you supply both, Plus and Minus, then
#samples classified outside those lists are exported as ZERO. If you don't want to export
#zero labeled vectors, then set the option "Zeros" to 0.
#Stream                         :       Stream  (filename or an object of an opened file)
#Data                           :       LIST OF DICTS. DICTS can be constructed using CreateData().
#Options                        :       Dictionary with optional values.
#                                               Supported options are: Plus (LIST OF CLASSID), Minus (LIST OF CLASSID) and Zeros (1/0)
#===================================================================================================
ExportOptions(self)
#===================================================================================================
#Class SVMPlugin
#ExportOptions()
#RETURNS DICT
#Gets you default settings for the Export function operation.
#===================================================================================================
__init__(self)
#===================================================================================================
#Class SVMPlugin
#CONSTRUCTOR
#===================================================================================================

Methods inherited from Plugin:
CanExport(self)
#===================================================================================================
#Class Plugin
#CanExport()
#Returns        :       self.MyCanExport
#===================================================================================================
CanImport(self)
#===================================================================================================
#Class Plugin
#CanImport()
#Returns        :       self.MyCanImport
#===================================================================================================
Import(self, Stream, Options={})
#===================================================================================================
#Class Plugin
#Import()
#It will be called only when the derived class does not have the capability to Import the format. It
#will generate a warning to notify user about unavailability of Import Function.
#Returns        :       None
#===================================================================================================
ImportOptions(self)
#===================================================================================================
#Class Plugin
#ImportOptions()
#RETURNS DICT
#Returns a dictionary with default options for importing
#===================================================================================================
Name(self)
#===================================================================================================
#Class Plugin
#Name()
#Returns        :       self.MyName
#===================================================================================================

Data and other attributes inherited from Plugin:
MultiCompleteData = 1
MultiRestrictedData = 3
NoCapability = 0
SingleCompleteData = 2
SingleRestrictedData = 4

 
class TranslatorPlugins
    #=======================================================================================================
#CLASS TranslatorPlugins
#This class is responsible for handling all the formats registered by the programmer. It maintains the 
#record of import-export plugins
#=======================================================================================================
 
  Methods defined here:
Add(self, PluginInfo)
Export(self, Name, Stream, Data, Options={})
#===================================================================================================
#Class TranslatorPlugins 
#Export()
#Exports data (Data) using a given stream (Stream) to a particular format (Name). If the format is not
#registered it generates an error. If the format is registered but the export is not supported a
#warning is generated by class Plugin.
#Parameter                      : Name  (Name of the format importer)
#                                       : Stream (File name or an object pointing to a file)
#                                       : Data (Data to be exported to file)
#===================================================================================================
Import(self, Name, Stream, Options={})
#===================================================================================================
#Class TranslatorPlugins 
#Import()
#Imports data using a given stream (Stream) from a particular format (Name). If the format is not
#registered it generates an error. If the format is registered but the import is not supported a
#warning is generated by class Plugin.
#Parameter                      : Name  (Name of the format importer)
#                                       : Stream (File name or an object pointing to a file)
#===================================================================================================
PrintAllFormatsInfo(self)
#===================================================================================================
#Class TranslatorPlugins 
#PrintAllFormatsInfo()
#Prints the name and availability of Import and Export Capabilities of a format
#===================================================================================================
Remove(self, PluginInfo)
#===================================================================================================
#Class TranslatorPlugins 
#Remove()
#Removes a plugin from self.MyRegistered.
#Parameter                      : PluginInfo    (Contains information about a plugin)
#===================================================================================================
__del__(self)
#===================================================================================================
#Class TranslatorPlugins 
#DESTRUCTOR
#===================================================================================================
__init__(self)
#===================================================================================================
#Class TranslatorPlugins 
#CONSTRUCTOR
#===================================================================================================

 
class XMLPlugin(Plugin)
    #=======================================================================================================
#CLASS XMLPlugin
#An XML Plugin class. Supports Import and Export from and to XML format.
#=======================================================================================================
 
  Methods defined here:
Export(self, Stream, Data, Options={})
#===================================================================================================
#Class XMLPlugins 
#Export()
#Exports data to an XML file 
#Parameter                      :       Stream  (filename or an object of an opened file)
#                                       :       Data    (Data to be exported)
#===================================================================================================
Import(self, Stream, Options={})
#===================================================================================================
#Class XMLPlugins 
#Import()
#Imports data from an XML file and returns an array of dictionary items having Vectors, Labels and 
#Probabilities. A dictionary entry will be 'None' if corresponding Data is not available in the XML
#Parameter                      :       Stream  (filename or an object of an opened file)
#Returns                        :       An array of dictionary values having Vectors, Labels and Probabilities
#===================================================================================================
__init__(self)
#===================================================================================================
#Class XMLPlugins 
#CONSTRUCTOR
#===================================================================================================

Methods inherited from Plugin:
CanExport(self)
#===================================================================================================
#Class Plugin
#CanExport()
#Returns        :       self.MyCanExport
#===================================================================================================
CanImport(self)
#===================================================================================================
#Class Plugin
#CanImport()
#Returns        :       self.MyCanImport
#===================================================================================================
ExportOptions(self)
#===================================================================================================
#Class Plugin
#ExportOptions()
#RETURNS DICT
#Returns a dictionary with default options for exporting
#===================================================================================================
ImportOptions(self)
#===================================================================================================
#Class Plugin
#ImportOptions()
#RETURNS DICT
#Returns a dictionary with default options for importing
#===================================================================================================
Name(self)
#===================================================================================================
#Class Plugin
#Name()
#Returns        :       self.MyName
#===================================================================================================

Data and other attributes inherited from Plugin:
MultiCompleteData = 1
MultiRestrictedData = 3
NoCapability = 0
SingleCompleteData = 2
SingleRestrictedData = 4

 
Functions
       
CreateData(Name=None, Vectors=None, Features=None, Labels=None, Probabilities=None, ClassIDs=None)
#=======================================================================================================
#FUNCTION CreateData( Name, Vectors, Labels, Probabilities, ClassIDs )
#RETURNS LIST OF DICTS
#This class packages the parameters into a single dictionary understood by the plugins.
#In order to store more than one translator in the file, you can do the following:
#Data = CreateData(...) + CreateData(...) + ...
#
#Name           : OPTIONAL STRING. Name of the translator
#Vectors        : OPTIONAL 2D ARRAY. Rows are feature vectors.
#Labels         : OPTIONAL LIST. Contains labels for each row
#Probabilitis:OPTIONAL 2D ARRAY. Probability of each feature vector to belong to a specific class
#ClassIDs       : MANDATORY TO PROBABILITIES. LIST. Identifies the headers (label) for each column in Probabilities.
#=======================================================================================================
Export(FilenameWithExtension, Data, Options={})
#=======================================================================================================
#FUNCTION Export( FilenameWithExtension, Data, Options={} )
#RETURNS 1/0
#This function exports the specified data to a file and respects the supplied options
#FilenameWithExtension  : STRING. Filename. Extension is used as type code for plug specification
#Data                                   : LIST OF DICTS. Structure i.e. created by CreateData(). 
#Options                                : DICT. Put in options for the plugins. Options not recognized by plugin are ignored.
#=======================================================================================================
Import(FilenameWithExtension, Options={})
#=======================================================================================================
#FUNCTION Import( FilenameWithExtension, Options={} )
#RETURNS LIST OF DICTS
#This function imports the specified file and respects the supplied options
#FilenameWithExtension  : STRING. Filename. Extension is used as type code for plug specification
#Options                                : DICT. Put in options for the plugins. Options not recognized by plugin are ignored.
#=======================================================================================================
PluginInfo()
#=======================================================================================================
#FUNCTION PluginInfo()
#RETURNS VOID
#Prints information about available formats on screen.
#=======================================================================================================
add_docstring(...)
docstring(obj, docstring)
 
Add a docstring to a built-in obj if possible.
If the obj already has a docstring raise a RuntimeError
If this routine does not know how to add a docstring to the object
raise a TypeError
alterdot(...)
alterdot() changes all dot functions to use blas.
arange(...)
arange([start,] stop[, step,], dtype=None)
 
For integer arguments, just like range() except it returns an array
whose type can be specified by the keyword argument dtype.  If dtype
is not specified, the type of the result is deduced from the type of
the arguments.
 
For floating point arguments, the length of the result is ceil((stop -
start)/step).  This rule may result in the last element of the result
being greater than stop.
array(...)
array(object, dtype=None, copy=1,order=None, subok=0,ndmin=0)
 
Return an array from object with the specified date-type.
 
Inputs:
  object - an array, any object exposing the array interface, any
            object whose __array__ method returns an array, or any
            (nested) sequence.
  dtype  - The desired data-type for the array.  If not given, then
            the type will be determined as the minimum type required
            to hold the objects in the sequence.  This argument can only
            be used to 'upcast' the array.  For downcasting, use the
            .astype(t) method.
  copy   - If true, then force a copy.  Otherwise a copy will only occur
            if __array__ returns a copy, obj is a nested sequence, or
            a copy is needed to satisfy any of the other requirements
  order  - Specify the order of the array.  If order is 'C', then the
            array will be in C-contiguous order (last-index varies the
            fastest).  If order is 'FORTRAN', then the returned array
            will be in Fortran-contiguous order (first-index varies the
            fastest).  If order is None, then the returned array may
            be in either C-, or Fortran-contiguous order or even
            discontiguous.
  subok  - If True, then sub-classes will be passed-through, otherwise
            the returned array will be forced to be a base-class array
  ndmin  - Specifies the minimum number of dimensions that the resulting
            array should have.  1's will be pre-pended to the shape as
            needed to meet this requirement.
asctime(...)
asctime([tuple]) -> string
 
Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.
When the time tuple is not present, current time as returned by localtime()
is used.
bincount(...)
bincount(x,weights=None)
 
Return the number of occurrences of each value in x.
 
x must be a list of non-negative integers.  The output, b[i],
represents the number of times that i is found in x.  If weights
is specified, every occurrence of i at a position p contributes
weights[p] instead of 1.
 
See also: histogram, digitize, unique.
can_cast(...)
can_cast(from=d1, to=d2)
 
Returns True if data type d1 can be cast to data type d2 without
losing precision.
clock(...)
clock() -> floating point number
 
Return the CPU time or real time since the start of the process or since
the first call to clock().  This has as much precision as the system
records.
compare_chararrays(...)
concatenate(...)
concatenate((a1, a2, ...), axis=0)
 
Join arrays together.
 
The tuple of sequences (a1, a2, ...) are joined along the given axis
(default is the first one) into a single numpy array.
 
Example:
 
>>> concatenate( ([0,1,2], [5,6,7]) )
array([0, 1, 2, 5, 6, 7])
ctime(...)
ctime(seconds) -> string
 
Convert a time in seconds since the Epoch to a string in local time.
This is equivalent to asctime(localtime(seconds)). When the time tuple is
not present, current time as returned by localtime() is used.
digitize(...)
digitize(x,bins)
 
Return the index of the bin to which each value of x belongs.
 
Each index i returned is such that bins[i-1] <= x < bins[i] if
bins is monotonically increasing, or bins [i-1] > x >= bins[i] if
bins is monotonically decreasing.
 
Beyond the bounds of the bins 0 or len(bins) is returned as appropriate.
dot(...)
dot(a,b)
Returns the dot product of a and b for arrays of floating point types.
Like the generic numpy equivalent the product sum is over
the last dimension of a and the second-to-last dimension of b.
NB: The first argument is not conjugated.
empty(...)
empty((d1,...,dn),dtype=float,order='C')
 
Return a new array of shape (d1,...,dn) and given type with all its
entries uninitialized. This can be faster than zeros.
fastCopyAndTranspose = _fastCopyAndTranspose(...)
_fastCopyAndTranspose(a)
frombuffer(...)
frombuffer(buffer=, dtype=float, count=-1, offset=0)
 
Returns a 1-d array of data type dtype from buffer. The buffer
argument must be an object that exposes the buffer interface.  If
count is -1 then the entire buffer is used, otherwise, count is the
size of the output.  If offset is given then jump that far into the
buffer. If the buffer has data that is out not in machine byte-order,
than use a propert data type descriptor. The data will not be
byteswapped, but the array will manage it in future operations.
fromfile(...)
fromfile(file=, dtype=float, count=-1, sep='') -> array.
 
Required arguments:
    file -- open file object or string containing file name.
 
Keyword arguments:
    dtype -- type and order of the returned array (default float)
    count -- number of items to input (default all)
    sep -- separater between items if file is a text file (default "")
 
Return an array of the given data type from a text or binary file. The
'file' argument can be an open file or a string with the name of a file to
read from.  If 'count' == -1 the entire file is read, otherwise count is the
number of items of the given type to read in.  If 'sep' is "" it means to
read binary data from the file using the specified dtype, otherwise it gives
the separator between elements in a text file. The 'dtype' value is also
used to determine the size and order of the items in binary files.
 
 
Data written using the tofile() method can be conveniently recovered using
this function.
 
WARNING: This function should be used sparingly as the binary files are not
platform independent. In particular, they contain no endianess or datatype
information. Nevertheless it can be useful for reading in simply formatted
or binary data quickly.
fromiter(...)
fromiter(iterable, dtype, count=-1)
 
Return a new 1d array initialized from iterable. If count is
nonegative, the new array will have count elements, otherwise it's
size is determined by the generator.
frompyfunc(...)
frompyfunc(func, nin, nout) take an arbitrary python function that takes nin objects as input and returns nout objects and return a universal function (ufunc).  This ufunc always returns PyObject arrays
fromstring(...)
fromstring(string, dtype=float, count=-1, sep='')
 
Return a new 1d array initialized from the raw binary data in string.
 
If count is positive, the new array will have count elements, otherwise its
size is determined by the size of string.  If sep is not empty then the
string is interpreted in ASCII mode and converted to the desired number type
using sep as the separator between elements (extra whitespace is ignored).
getbuffer(...)
getbuffer(obj [,offset[, size]])
 
Create a buffer object from the given object referencing a slice of
length size starting at offset.  Default is the entire buffer. A
read-write buffer is attempted followed by a read-only buffer.
geterrobj(...)
gmtime(...)
gmtime([seconds]) -> (tm_year, tm_mon, tm_day, tm_hour, tm_min,
                       tm_sec, tm_wday, tm_yday, tm_isdst)
 
Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.
GMT).  When 'seconds' is not passed in, convert the current time instead.
inner(...)
innerproduct(a,b)
Returns the inner product of a and b for arrays of floating point types.
Like the generic NumPy equivalent the product sum is over
the last dimension of a and b.
NB: The first argument is not conjugated.
int_asbuffer(...)
interp(...)
interp(x, xp, fp, left=None, right=None)
 
Return the value of a piecewise-linear function at each value in x.
 
The piecewise-linear function, f, is defined by the known data-points fp=f(xp).
The xp points must be sorted in increasing order but this is not checked.
 
For values of x < xp[0] return the value given by left.  If left is None, then
return fp[0].
For values of x > xp[-1] return the value given by right. If right is None, then
return fp[-1].
lexsort(...)
lexsort(keys=, axis=-1) -> array of indices. Argsort with list of keys.
 
Perform an indirect sort using a list of keys. The first key is sorted,
then the second, and so on through the list of keys. At each step the
previous order is preserved when equal keys are encountered. The result is
a sort on multiple keys.  If the keys represented columns of a spreadsheet,
for example, this would sort using multiple columns (the last key being
used for the primary sort order, the second-to-last key for the secondary
sort order, and so on).  The keys argument must be a sequence of things
that can be converted to arrays of the same shape.
 
:Parameters:
 
    a : array type
        Array containing values that the returned indices should sort.
 
    axis : integer
        Axis to be indirectly sorted. None indicates that the flattened
        array should be used. Default is -1.
 
:Returns:
 
    indices : integer array
        Array of indices that sort the keys along the specified axis. The
        array has the same shape as the keys.
 
:SeeAlso:
 
  - argsort : indirect sort
  - sort : inplace sort
loads(...)
loads(string) -- Load a pickle from the given string
localtime(...)
localtime([seconds]) -> (tm_year,tm_mon,tm_day,tm_hour,tm_min,tm_sec,tm_wday,tm_yday,tm_isdst)
 
Convert seconds since the Epoch to a time tuple expressing local time.
When 'seconds' is not passed in, convert the current time instead.
mktime(...)
mktime(tuple) -> floating point number
 
Convert a time tuple in local time to seconds since the Epoch.
newbuffer(...)
newbuffer(size)
 
Return a new uninitialized buffer object of size bytes
putmask(...)
putmask(a, mask, values) sets a.flat[n] = values[n] for each n where
mask.flat[n] is true.  If values is not the same size of a and mask then
it will repeat.  This gives different behavior than a[mask] = values.
rand(...)
Return an array of the given dimensions which is initialized to 
random numbers from a uniform distribution in the range [0,1).
 
rand(d0, d1, ..., dn) -> random values
 
Note:  This is a convenience function. If you want an
            interface that takes a tuple as the first argument
            use numpy.random.random_sample(shape_tuple).
randn(...)
Returns zero-mean, unit-variance Gaussian random numbers in an 
array of shape (d0, d1, ..., dn).
 
randn(d0, d1, ..., dn) -> random values
 
Note:  This is a convenience function. If you want an
            interface that takes a tuple as the first argument
            use numpy.random.standard_normal(shape_tuple).
restoredot(...)
restoredot() restores dots to defaults.
set_numeric_ops(...)
set_numeric_ops(op=func, ...)
 
Set some or all of the number methods for all array objects.  Do not
forget **dict can be used as the argument list.  Return the functions
that were replaced, which can be stored and set later.
set_string_function(...)
set_string_function(f, repr=1)
 
Set the python function f to be the function used to obtain a pretty
printable string version of an array whenever an array is printed.
f(M) should expect an array argument M, and should return a string
consisting of the desired representation of M for printing.
seterrobj(...)
sleep(...)
sleep(seconds)
 
Delay execution for a given number of seconds.  The argument may be
a floating point number for subsecond precision.
strftime(...)
strftime(format[, tuple]) -> string
 
Convert a time tuple to a string according to a format specification.
See the library reference manual for formatting codes. When the time tuple
is not present, current time as returned by localtime() is used.
strptime(...)
strptime(string, format) -> struct_time
 
Parse a string to a time tuple according to a format specification.
See the library reference manual for formatting codes (same as strftime()).
time(...)
time() -> floating point number
 
Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.
tzset(...)
tzset(zone)
 
Initialize, or reinitialize, the local timezone to the value stored in
os.environ['TZ']. The TZ environment variable should be specified in
standard Unix timezone format as documented in the tzset man page
(eg. 'US/Eastern', 'Europe/Amsterdam'). Unknown timezones will silently
fall back to UTC. If the TZ environment variable is not set, the local
timezone is set to the systems best guess of wallclock time.
Changing the TZ environment variable without calling tzset *may* change
the local timezone used by methods such as localtime, but this behaviour
should not be relied on.
vdot(...)
vdot(a,b)
Returns the dot product of a and b for scalars and vectors
of floating point and complex types.  The first argument, a, is conjugated.
where(...)
where(condition, | x, y)
 
The result is shaped like condition and has elements of x and y where
condition is respectively true or false.  If x or y are not given,
then it is equivalent to condition.nonzero().
 
To group the indices by element, rather than dimension, use
 
    transpose(where(condition, | x, y))
 
instead. This always results in a 2d array, with a row of indices for
each element that satisfies the condition.
zeros(...)
zeros((d1,...,dn),dtype=float,order='C')
 
Return a new array of shape (d1,...,dn) and type typecode with all
it's entries initialized to zero.

 
Data
        ALLOW_THREADS = 1
BUFSIZE = 10000
CLIP = 0
ERR_CALL = 3
ERR_DEFAULT = 0
ERR_DEFAULT2 = 2084
ERR_IGNORE = 0
ERR_LOG = 5
ERR_PRINT = 4
ERR_RAISE = 2
ERR_WARN = 1
FLOATING_POINT_SUPPORT = 1
FPE_DIVIDEBYZERO = 1
FPE_INVALID = 8
FPE_OVERFLOW = 2
FPE_UNDERFLOW = 4
False_ = False
Inf = inf
Infinity = inf
MAXDIMS = 32
ModuleVerbosity = 1
NAN = nan
NINF = -inf
NZERO = -0.0
NaN = nan
PINF = inf
PZERO = 0.0
RAISE = 2
SHIFT_DIVIDEBYZERO = 0
SHIFT_INVALID = 9
SHIFT_OVERFLOW = 3
SHIFT_UNDERFLOW = 6
ScalarType = (<type 'int'>, <type 'float'>, <type 'complex'>, <type 'long'>, <type 'bool'>, <type 'str'>, <type 'unicode'>, <type 'buffer'>, <type 'numpy.int64'>, <type 'numpy.int16'>, <type 'numpy.uint16'>, <type 'numpy.int64'>, <type 'numpy.float64'>, <type 'numpy.float128'>, <type 'numpy.float32'>, <type 'numpy.uint32'>, <type 'numpy.uint64'>, <type 'numpy.int8'>, <type 'numpy.unicode_'>, <type 'numpy.string_'>, ...)
TranslatorPluginRegister = <PaREnTranslatorPlugins.TranslatorPlugins instance at 0x318de60>
True_ = True
UFUNC_BUFSIZE_DEFAULT = 10000
UFUNC_PYVALS_NAME = 'UFUNC_PYVALS'
WRAP = 1
__author__ = 'Atif Mehdi, Aleksander Lodwich'
__copyright__ = 'Copyright (C) 2008 DFKI'
__version__ = '0.1'
absolute = <ufunc 'absolute'>
accept2dyear = 1
add = <ufunc 'add'>
altzone = -7200
arccosh = <ufunc 'arccosh'>
arcsinh = <ufunc 'arcsinh'>
arctan = <ufunc 'arctan'>
arctan2 = <ufunc 'arctan2'>
bitwise_and = <ufunc 'bitwise_and'>
bitwise_not = <ufunc 'invert'>
bitwise_or = <ufunc 'bitwise_or'>
bitwise_xor = <ufunc 'bitwise_xor'>
c_ = <numpy.lib.index_tricks.c_class object at 0x2d33f10>
cast = {<type 'numpy.int64'>: <function <lambda> at 0x2...numpy.uint16'>: <function <lambda> at 0x2df5410>}
ceil = <ufunc 'ceil'>
conj = <ufunc 'conjugate'>
conjugate = <ufunc 'conjugate'>
cos = <ufunc 'cos'>
cosh = <ufunc 'cosh'>
daylight = 1
divide = <ufunc 'divide'>
e = 2.7182818284590451
equal = <ufunc 'equal'>
exp = <ufunc 'exp'>
expm1 = <ufunc 'expm1'>
fabs = <ufunc 'fabs'>
floor = <ufunc 'floor'>
floor_divide = <ufunc 'floor_divide'>
fmod = <ufunc 'fmod'>
frexp = <ufunc 'frexp'>
greater = <ufunc 'greater'>
greater_equal = <ufunc 'greater_equal'>
hypot = <ufunc 'hypot'>
index_exp = <numpy.lib.index_tricks._index_expression_class object at 0x2d44090>
inf = inf
infty = inf
invert = <ufunc 'invert'>
isfinite = <ufunc 'isfinite'>
isinf = <ufunc 'isinf'>
isnan = <ufunc 'isnan'>
ldexp = <ufunc 'ldexp'>
left_shift = <ufunc 'left_shift'>
less = <ufunc 'less'>
less_equal = <ufunc 'less_equal'>
little_endian = True
log1p = <ufunc 'log1p'>
logical_and = <ufunc 'logical_and'>
logical_not = <ufunc 'logical_not'>
logical_or = <ufunc 'logical_or'>
logical_xor = <ufunc 'logical_xor'>
maximum = <ufunc 'maximum'>
mgrid = <numpy.lib.index_tricks.nd_grid object at 0x2d33dd0>
minimum = <ufunc 'minimum'>
mod = <ufunc 'remainder'>
modf = <ufunc 'modf'>
multiply = <ufunc 'multiply'>
nan = nan
nbytes = {<type 'numpy.int64'>: 8, <type 'numpy.int16'>: ...py.complex64'>: 8, <type 'numpy.complex128'>: 16}
negative = <ufunc 'negative'>
newaxis = None
not_equal = <ufunc 'not_equal'>
ogrid = <numpy.lib.index_tricks.nd_grid object at 0x2d33e10>
ones_like = <ufunc 'ones_like'>
pi = 3.1415926535897931
pkgload = <numpy._import_tools.PackageLoader instance at 0x2e94b00>
r_ = <numpy.lib.index_tricks.r_class object at 0x2d33e90>
reciprocal = <ufunc 'reciprocal'>
remainder = <ufunc 'remainder'>
right_shift = <ufunc 'right_shift'>
rint = <ufunc 'rint'>
s_ = <numpy.lib.index_tricks._index_expression_class object at 0x2d440d0>
sctypeDict = {0: <type 'numpy.bool_'>, 1: <type 'numpy.int8'>, 2: <type 'numpy.uint8'>, 3: <type 'numpy.int16'>, 4: <type 'numpy.uint16'>, 5: <type 'numpy.int32'>, 6: <type 'numpy.uint32'>, 7: <type 'numpy.int64'>, 8: <type 'numpy.uint64'>, 9: <type 'numpy.int64'>, ...}
sctypeNA = {'?': 'Bool', 'B': 'UInt8', 'Bool': <type 'numpy.bool_'>, 'Complex128': <type 'numpy.complex256'>, 'Complex32': <type 'numpy.complex64'>, 'Complex64': <type 'numpy.complex128'>, 'D': 'Complex64', 'F': 'Complex32', 'Float128': <type 'numpy.float128'>, 'Float32': <type 'numpy.float32'>, ...}
sctypes = {'complex': [<type 'numpy.complex64'>, <type 'numpy.complex128'>, <type 'numpy.complex256'>], 'float': [<type 'numpy.float32'>, <type 'numpy.float64'>, <type 'numpy.float128'>], 'int': [<type 'numpy.int8'>, <type 'numpy.int16'>, <type 'numpy.int32'>, <type 'numpy.int64'>], 'others': [<type 'bool'>, <type 'object'>, <type 'str'>, <type 'unicode'>, <type 'numpy.void'>], 'uint': [<type 'numpy.uint8'>, <type 'numpy.uint16'>, <type 'numpy.uint32'>, <type 'numpy.uint64'>]}
sign = <ufunc 'sign'>
signbit = <ufunc 'signbit'>
sin = <ufunc 'sin'>
sinh = <ufunc 'sinh'>
square = <ufunc 'square'>
subtract = <ufunc 'subtract'>
tan = <ufunc 'tan'>
tanh = <ufunc 'tanh'>
timezone = -3600
true_divide = <ufunc 'true_divide'>
typeDict = {0: <type 'numpy.bool_'>, 1: <type 'numpy.int8'>, 2: <type 'numpy.uint8'>, 3: <type 'numpy.int16'>, 4: <type 'numpy.uint16'>, 5: <type 'numpy.int32'>, 6: <type 'numpy.uint32'>, 7: <type 'numpy.int64'>, 8: <type 'numpy.uint64'>, 9: <type 'numpy.int64'>, ...}
typeNA = {'?': 'Bool', 'B': 'UInt8', 'Bool': <type 'numpy.bool_'>, 'Complex128': <type 'numpy.complex256'>, 'Complex32': <type 'numpy.complex64'>, 'Complex64': <type 'numpy.complex128'>, 'D': 'Complex64', 'F': 'Complex32', 'Float128': <type 'numpy.float128'>, 'Float32': <type 'numpy.float32'>, ...}
typecodes = {'All': '?bhilqpBHILQPfdgFDGSUVO', 'AllFloat': 'fdgFDG', 'AllInteger': 'bBhHiIlLqQpP', 'Character': 'S1', 'Complex': 'FDG', 'Float': 'fdg', 'Integer': 'bhilqp', 'UnsignedInteger': 'BHILQP'}
tzname = ('CET', 'CEST')

 
Author
        Atif Mehdi, Aleksander Lodwich