numpy.numarray.numerictypes
index
/usr/lib/python2.6/dist-packages/numpy/numarray/numerictypes.py

numerictypes: Define the numeric type objects
 
This module is designed so 'from numerictypes import *' is safe.
Exported symbols include:
 
  Dictionary with all registered number types (including aliases):
    typeDict
 
  Numeric type objects:
    Bool
    Int8 Int16 Int32 Int64
    UInt8 UInt16 UInt32 UInt64
    Float32 Double64
    Complex32 Complex64
 
  Numeric type classes:
    NumericType
      BooleanType
      SignedType
      UnsignedType
      IntegralType
        SignedIntegralType
        UnsignedIntegralType
      FloatingType
      ComplexType
 
$Id: numerictypes.py,v 1.55 2005/12/01 16:22:03 jaytmiller Exp $

 
Modules
       
numpy

 
Classes
       
object
NumericType
AnyType
BooleanType
ComplexType
FloatingType
IntegralType
SignedIntegralType(IntegralType, SignedType)
UnsignedIntegralType(IntegralType, UnsignedType)
ObjectType
SignedType
UnsignedType

 
class AnyType(NumericType)
    
Method resolution order:
AnyType
NumericType
object

Methods inherited from NumericType:
__getnewargs__(self)
support the pickling protocol.
__getstate__(self)
support pickling protocol... no __setstate__ required.
__init__(self, name, bytes, default, typeno)

Static methods inherited from NumericType:
__new__(type, name, bytes, default, typeno)
__new__() implements a 'quasi-singleton pattern because attempts
to create duplicate types return the first created instance of that
particular type parameterization,  i.e. the second time you try to
create "Int32",  you get the original Int32, not a new one.

Data descriptors inherited from NumericType:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class BooleanType(NumericType)
    
Method resolution order:
BooleanType
NumericType
object

Methods inherited from NumericType:
__getnewargs__(self)
support the pickling protocol.
__getstate__(self)
support pickling protocol... no __setstate__ required.
__init__(self, name, bytes, default, typeno)

Static methods inherited from NumericType:
__new__(type, name, bytes, default, typeno)
__new__() implements a 'quasi-singleton pattern because attempts
to create duplicate types return the first created instance of that
particular type parameterization,  i.e. the second time you try to
create "Int32",  you get the original Int32, not a new one.

Data descriptors inherited from NumericType:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class ComplexType(NumericType)
    
Method resolution order:
ComplexType
NumericType
object

Methods inherited from NumericType:
__getnewargs__(self)
support the pickling protocol.
__getstate__(self)
support pickling protocol... no __setstate__ required.
__init__(self, name, bytes, default, typeno)

Static methods inherited from NumericType:
__new__(type, name, bytes, default, typeno)
__new__() implements a 'quasi-singleton pattern because attempts
to create duplicate types return the first created instance of that
particular type parameterization,  i.e. the second time you try to
create "Int32",  you get the original Int32, not a new one.

Data descriptors inherited from NumericType:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class FloatingType(NumericType)
    
Method resolution order:
FloatingType
NumericType
object

Methods inherited from NumericType:
__getnewargs__(self)
support the pickling protocol.
__getstate__(self)
support pickling protocol... no __setstate__ required.
__init__(self, name, bytes, default, typeno)

Static methods inherited from NumericType:
__new__(type, name, bytes, default, typeno)
__new__() implements a 'quasi-singleton pattern because attempts
to create duplicate types return the first created instance of that
particular type parameterization,  i.e. the second time you try to
create "Int32",  you get the original Int32, not a new one.

Data descriptors inherited from NumericType:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class IntegralType(NumericType)
    
Method resolution order:
IntegralType
NumericType
object

Methods inherited from NumericType:
__getnewargs__(self)
support the pickling protocol.
__getstate__(self)
support pickling protocol... no __setstate__ required.
__init__(self, name, bytes, default, typeno)

Static methods inherited from NumericType:
__new__(type, name, bytes, default, typeno)
__new__() implements a 'quasi-singleton pattern because attempts
to create duplicate types return the first created instance of that
particular type parameterization,  i.e. the second time you try to
create "Int32",  you get the original Int32, not a new one.

Data descriptors inherited from NumericType:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class NumericType(object)
    Numeric type class
 
Used both as a type identification and the repository of
characteristics and conversion functions.
 
  Methods defined here:
__getnewargs__(self)
support the pickling protocol.
__getstate__(self)
support pickling protocol... no __setstate__ required.
__init__(self, name, bytes, default, typeno)

Static methods defined here:
__new__(type, name, bytes, default, typeno)
__new__() implements a 'quasi-singleton pattern because attempts
to create duplicate types return the first created instance of that
particular type parameterization,  i.e. the second time you try to
create "Int32",  you get the original Int32, not a new one.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class ObjectType(NumericType)
    
Method resolution order:
ObjectType
NumericType
object

Methods inherited from NumericType:
__getnewargs__(self)
support the pickling protocol.
__getstate__(self)
support pickling protocol... no __setstate__ required.
__init__(self, name, bytes, default, typeno)

Static methods inherited from NumericType:
__new__(type, name, bytes, default, typeno)
__new__() implements a 'quasi-singleton pattern because attempts
to create duplicate types return the first created instance of that
particular type parameterization,  i.e. the second time you try to
create "Int32",  you get the original Int32, not a new one.

Data descriptors inherited from NumericType:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class SignedIntegralType(IntegralType, SignedType)
    
Method resolution order:
SignedIntegralType
IntegralType
NumericType
object
SignedType

Methods inherited from NumericType:
__getnewargs__(self)
support the pickling protocol.
__getstate__(self)
support pickling protocol... no __setstate__ required.
__init__(self, name, bytes, default, typeno)

Static methods inherited from NumericType:
__new__(type, name, bytes, default, typeno)
__new__() implements a 'quasi-singleton pattern because attempts
to create duplicate types return the first created instance of that
particular type parameterization,  i.e. the second time you try to
create "Int32",  you get the original Int32, not a new one.

Data descriptors inherited from NumericType:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class SignedType
    Marker class used for signed type check
 
 

 
class UnsignedIntegralType(IntegralType, UnsignedType)
    
Method resolution order:
UnsignedIntegralType
IntegralType
NumericType
object
UnsignedType

Methods inherited from NumericType:
__getnewargs__(self)
support the pickling protocol.
__getstate__(self)
support pickling protocol... no __setstate__ required.
__init__(self, name, bytes, default, typeno)

Static methods inherited from NumericType:
__new__(type, name, bytes, default, typeno)
__new__() implements a 'quasi-singleton pattern because attempts
to create duplicate types return the first created instance of that
particular type parameterization,  i.e. the second time you try to
create "Int32",  you get the original Int32, not a new one.

Data descriptors inherited from NumericType:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class UnsignedType
    Marker class used for unsigned type check
 
 

 
Functions
       
IsType(rep)
Determines whether the given object or string, 'rep', represents
a numarray type.
MaximumType(t)
returns the type of highest precision of the same general kind as 't'
_initGenericCoercions()
_register(name, type, force=0)
Register the type object.  Raise an exception if it is already registered
unless force is true.
_scipy_alias(scipy_type, numarray_type)
getType(type)
Return the numeric type object for type
 
type may be the name of a type object or the actual object
typefrom(obj)

 
Data
        Any = <numpy.numarray.numerictypes.AnyType object at 0x4f81b90>
Bool = <numpy.numarray.numerictypes.BooleanType object at 0x4f81c10>
Byte = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c50>
Complex = <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>
Complex32 = <numpy.numarray.numerictypes.ComplexType object at 0x4f81ed0>
Complex64 = <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>
Float = <numpy.numarray.numerictypes.FloatingType object at 0x4f81d90>
Float32 = <numpy.numarray.numerictypes.FloatingType object at 0x4f81d50>
Float64 = <numpy.numarray.numerictypes.FloatingType object at 0x4f81d90>
HasUInt64 = 1
Int = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81cd0>
Int16 = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c90>
Int32 = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81cd0>
Int64 = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>
Int8 = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c50>
LP64 = True
Long = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>
MAX_ALIGN = 8
MAX_INT_SIZE = 8
MaybeLong = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>
Object = <numpy.numarray.numerictypes.ObjectType object at 0x4f81bd0>
Short = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c90>
UInt16 = <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e10>
UInt32 = <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e50>
UInt64 = <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e90>
UInt8 = <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81dd0>
_MaximumType = {<numpy.numarray.numerictypes.BooleanType object at 0x4f81c10>: <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e90>, <numpy.numarray.numerictypes.ComplexType object at 0x4f81ed0>: <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>, <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>: <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>, <numpy.numarray.numerictypes.FloatingType object at 0x4f81d50>: <numpy.numarray.numerictypes.FloatingType object at 0x4f81d90>, <numpy.numarray.numerictypes.FloatingType object at 0x4f81d90>: <numpy.numarray.numerictypes.FloatingType object at 0x4f81d90>, <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c50>: <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>, <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c90>: <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>, <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81cd0>: <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>, <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>: <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>, <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81dd0>: <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e90>, ...}
__all__ = ['NumericType', 'HasUInt64', 'typeDict', 'IsType', 'BooleanType', 'SignedType', 'UnsignedType', 'IntegralType', 'SignedIntegralType', 'UnsignedIntegralType', 'FloatingType', 'ComplexType', 'AnyType', 'ObjectType', 'Any', 'Object', 'Bool', 'Int8', 'Int16', 'Int32', ...]
__file__ = '/usr/lib/python2.6/dist-packages/numpy/numarray/numerictypes.pyc'
__name__ = 'numpy.numarray.numerictypes'
__package__ = 'numpy.numarray'
_scipy_dtypechar = {<numpy.numarray.numerictypes.ComplexType object at 0x4f81ed0>: 'F', <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>: 'D', <numpy.numarray.numerictypes.FloatingType object at 0x4f81d50>: 'f', <numpy.numarray.numerictypes.FloatingType object at 0x4f81d90>: 'd', <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c50>: 'b', <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c90>: 'h', <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81cd0>: 'i', <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>: 'q', <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81dd0>: 'B', <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e10>: 'H', ...}
_scipy_dtypechar_inverse = {'B': <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81dd0>, 'D': <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>, 'F': <numpy.numarray.numerictypes.ComplexType object at 0x4f81ed0>, 'H': <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e10>, 'I': <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e50>, 'L': <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e90>, 'P': <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e90>, 'Q': <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e90>, 'b': <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c50>, 'd': <numpy.numarray.numerictypes.FloatingType object at 0x4f81d90>, ...}
_tAny = 0
_tBool = 1
_tComplex32 = 12
_tComplex64 = 13
_tFloat32 = 10
_tFloat64 = 11
_tInt16 = 4
_tInt32 = 6
_tInt64 = 8
_tInt8 = 2
_tObject = 14
_tUInt16 = 5
_tUInt32 = 7
_tUInt64 = 9
_tUInt8 = 3
bool8 = <numpy.numarray.numerictypes.BooleanType object at 0x4f81c10>
bool_ = <numpy.numarray.numerictypes.BooleanType object at 0x4f81c10>
complex128 = <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>
complex64 = <numpy.numarray.numerictypes.ComplexType object at 0x4f81ed0>
float32 = <numpy.numarray.numerictypes.FloatingType object at 0x4f81d50>
float64 = <numpy.numarray.numerictypes.FloatingType object at 0x4f81d90>
genericCoercions = {('Bool', 'Bool'): 'Bool', ('Bool', 'Complex32'): 'Complex32', ('Bool', 'Complex64'): 'Complex64', ('Bool', 'Float32'): 'Float32', ('Bool', 'Float64'): 'Float64', ('Bool', 'Int16'): 'Int16', ('Bool', 'Int32'): 'Int32', ('Bool', 'Int64'): 'Int64', ('Bool', 'Int8'): 'Int8', ('Bool', 'Object'): 'Object', ...}
genericPromotionExclusions = {'Bool': (), 'Complex32': (), 'Complex64': (), 'Float32': (), 'Float64': ('Complex32',), 'Int16': (), 'Int32': ('Float32', 'Complex32'), 'Int64': ('Float32', 'Complex32'), 'Int8': (), 'UInt16': (), ...}
genericTypeRank = ['Bool', 'Int8', 'UInt8', 'Int16', 'UInt16', 'Int32', 'UInt32', 'Int64', 'UInt64', 'Float32', 'Float64', 'Complex32', 'Complex64', 'Object']
int16 = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c90>
int32 = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81cd0>
int64 = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81d10>
int8 = <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c50>
key = <numpy.numarray.numerictypes.FloatingType object at 0x4f81d50>
pythonTypeMap = {<type 'float'>: ('Float64', 'float'), <type 'int'>: ('Int64', 'int'), <type 'long'>: ('Int64', 'int'), <type 'bool'>: ('Bool', 'bool'), <type 'complex'>: ('Complex64', 'complex')}
pythonTypeRank = [<type 'bool'>, <type 'int'>, <type 'long'>, <type 'float'>, <type 'complex'>]
scalarTypeMap = {<type 'float'>: 'Float64', <type 'int'>: 'Int64', <type 'long'>: 'Int64', <type 'bool'>: 'Bool', <type 'complex'>: 'Complex64'}
scalarTypes = (<type 'bool'>, <type 'int'>, <type 'long'>, <type 'float'>, <type 'complex'>)
typeDict = {'1': <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c50>, 'Any': <numpy.numarray.numerictypes.AnyType object at 0x4f81b90>, 'B': <numpy.numarray.numerictypes.BooleanType object at 0x4f81c10>, 'Bool': <numpy.numarray.numerictypes.BooleanType object at 0x4f81c10>, 'Byte': <numpy.numarray.numerictypes.SignedIntegralType object at 0x4f81c50>, 'Complex': <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>, 'Complex32': <numpy.numarray.numerictypes.ComplexType object at 0x4f81ed0>, 'Complex64': <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>, 'D': <numpy.numarray.numerictypes.ComplexType object at 0x4f81f10>, 'F': <numpy.numarray.numerictypes.ComplexType object at 0x4f81ed0>, ...}
typecodes = {'Character': 'c', 'Complex': 'FD', 'Float': 'fd', 'Integer': '1silN', 'UnsignedInteger': 'bBwuU'}
uint16 = <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e10>
uint32 = <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e50>
uint64 = <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81e90>
uint8 = <numpy.numarray.numerictypes.UnsignedIntegralType object at 0x4f81dd0>
value = 'f'