← Back to team overview

dolfin team mailing list archive

Bug in Vector.init

 

In [1]: from dolfin import *
v = Vector()
In [2]: v = Vector()

In [3]: v.init(10)
---------------------------------------------------------------------------
<type 'exceptions.TypeError'>             Traceback (most recent call last)

/home/martinal/<ipython console> in <module>()

/opt/dolfin/lib/python2.5/site-packages/dolfin/cpp.py in init(*args)
   2179         Initialize zero tensor using sparsity pattern.
   2180         """
-> 2181         return _cpp.GenericVector_init(*args)
   2182
   2183     def copy(*args):

<type 'exceptions.TypeError'>: in method 'GenericVector_init',
argument 2 of type 'dolfin::GenericSparsityPattern const &'


This simpler case works:

In [1]: from dolfin import *

In [2]: v = Vector(10)

In [3]:



Martin