Package Scientific :: Module NumberDict :: Class NumberDict
[hide private]
[frames] | no frames]

Class NumberDict



object --+    
         |    
      dict --+
             |
            NumberDict

Dictionary storing numerical values

Constructor: NumberDict()

An instance of this class acts like an array of number with generalized (non-integer) indices. A value of zero is assumed for undefined entries. NumberDict instances support addition, and subtraction with other NumberDict instances, and multiplication and division by scalars.

Instance Methods [hide private]
  __add__(self, other)
  __coerce__(self, other)
  __div__(self, other)
  __getitem__(self, item)
x[y]
  __mul__(self, other)
  __sub__(self, other)

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __init__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__, __str__


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__add__(self, other)
(Addition operator)

 

__coerce__(self, other)

 

__div__(self, other)

 

__getitem__(self, item)
(Indexing operator)

 

x[y]
Overrides: dict.__getitem__
(inherited documentation)

__mul__(self, other)

 

__sub__(self, other)
(Subtraction operator)