steady method of pykov.Chain method doesn't work
hmitiche opened this issue · 4 comments
I tried the example of the tutorial:
T = pykov.Chain({('A','B'): .3, ('A','A'): .7, ('B','A'): 1.})
T.steady()
here below the error:
In [9]: T.steady()
TypeError Traceback (most recent call last)
/home/hakim/myexperiments/tastp/ in ()
----> 1 T.steady()
/usr/local/lib/python2.7/dist-packages/pykov.pyc in steady(self)
938 m = len(e2p)
939 P = self.dok(e2p).tocsr()
--> 940 Q = ss.eye(m, format='csr') - P
941 e = numpy.zeros(m)
942 e[-1] = 1.
TypeError: eye() takes at least 2 arguments (2 given)
The issue seems related to scipy.sparse
(imported as ss
).
I cannot replicate the error with version:
>>> scipy.__version__
'0.14.0'
Are you using the same version?
I have an older version:
In [39]: scipy.__version__
Out[39]: '0.9.0'
but can't upgrade to a new version:
#sudo apt-get install python-scipy
[sudo] password for hakim:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-scipy is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 265 not upgraded.
Is your packages index updated?
# sudo apt-get update
Thanks for the suggestion and sorry for raising issue that are out of the scope of pykov.
Problem fixed and just in case, here where I found a solution that helped me to upgrade scipy:
http://stackoverflow.com/questions/17925381/cant-upgrade-scipy