Package parsimony :: Package utils :: Module start_vectors :: Class ZerosStartVector
[hide private]
[frames] | no frames]

Class ZerosStartVector

source code

     object --+    
              |    
BaseStartVector --+
                  |
                 ZerosStartVector

A start vector of zeros.

Use with care! Be aware that using this in algorithms that are not aware
may result in division by zero since the norm of this start vector is 0.

Examples
--------
>>> from parsimony.utils.start_vectors import ZerosStartVector
>>> start_vector = ZerosStartVector()
>>> zeros = start_vector.get_vector(3)
>>> print zeros
[[ 0.]
 [ 0.]
 [ 0.]]

Nested Classes [hide private]

Inherited from BaseStartVector: __metaclass__

Instance Methods [hide private]
 
__init__(self, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
get_vector(self, size)
Return vector of zeros of chosen shape.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

get_vector(self, size)

source code 
Return vector of zeros of chosen shape.

Parameters
----------
size : Positive integer. Size of the vector to generate. The shape of
        the output is (size, 1).

Examples
--------
>>> from parsimony.utils.start_vectors import ZerosStartVector
>>> start_vector = ZerosStartVector()
>>> zeros = start_vector.get_vector(3)
>>> print zeros
[[ 0.]
 [ 0.]
 [ 0.]]

Overrides: BaseStartVector.get_vector