markovmodel / msmtools

Tools for estimating and analyzing Markov state models
GNU Lesser General Public License v3.0
40 stars 26 forks source link

doctest largest_connected_submatrix fails on py3.4 #40

Closed marscher closed 9 years ago

marscher commented 9 years ago
FAIL: Doctest: msmtools.estimation.api.largest_connected_submatrix

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/miniconda/envs/ci/lib/python3.4/doctest.py", line 2187, in runTest

    raise self.failureException(self.format_failure(new.getvalue()))

AssertionError: Failed doctest test for msmtools.estimation.api.largest_connected_submatrix

  File "/home/travis/build/markovmodel/msmtools/msmtools/estimation/api.py", line 524, in largest_connected_submatrix

----------------------------------------------------------------------

File "/home/travis/build/markovmodel/msmtools/msmtools/estimation/api.py", line 568, in msmtools.estimation.api.largest_connected_submatrix

Failed example:

    C_cc_directed

Expected:

    array([[10,  1],

           [ 2,  0]])

Got:

    array([[10,  1],

           [ 2,  0]], dtype=int64)

----------------------------------------------------------------------

File "/home/travis/build/markovmodel/msmtools/msmtools/estimation/api.py", line 573, in msmtools.estimation.api.largest_connected_submatrix

Failed example:

    C_cc_undirected

Expected:

    array([[10,  1,  0],

           [ 2,  0,  3],

           [ 0,  0,  4]])

Got:

    array([[10,  1,  0],

           [ 2,  0,  3],

           [ 0,  0,  4]], dtype=int64)
franknoe commented 9 years ago

Has the default datatype when creating an array changed?

Am 28/07/15 um 12:32 schrieb Martin K. Scherer:

|FAIL: Doctest: msmtools.estimation.api.largest_connected_submatrix


Traceback (most recent call last):

File "/home/travis/miniconda/envs/ci/lib/python3.4/doctest.py", line 2187, in runTest

 raise self.failureException(self.format_failure(new.getvalue()))

AssertionError: Failed doctest test for msmtools.estimation.api.largest_connected_submatrix

File "/home/travis/build/markovmodel/msmtools/msmtools/estimation/api.py", line 524, in largest_connected_submatrix


File "/home/travis/build/markovmodel/msmtools/msmtools/estimation/api.py", line 568, in msmtools.estimation.api.largest_connected_submatrix

Failed example:

 C_cc_directed

Expected:

 array([[10,  1],

        [ 2,  0]])

Got:

 array([[10,  1],

        [ 2,  0]], dtype=int64)

File "/home/travis/build/markovmodel/msmtools/msmtools/estimation/api.py", line 573, in msmtools.estimation.api.largest_connected_submatrix

Failed example:

 C_cc_undirected

Expected:

 array([[10,  1,  0],

        [ 2,  0,  3],

        [ 0,  0,  4]])

Got:

 array([[10,  1,  0],

        [ 2,  0,  3],

        [ 0,  0,  4]], dtype=int64)

— Reply to this email directly or view it on GitHub https://github.com/markovmodel/msmtools/issues/40.


Prof. Dr. Frank Noe Head of Computational Molecular Biology group Freie Universitaet Berlin

Phone: (+49) (0)30 838 75354 Web: research.franknoe.de

Mail: Arnimallee 6, 14195 Berlin, Germany

marscher commented 9 years ago

seems like that. So maybe we should pin it down to 32bits?

franknoe commented 9 years ago

Since this is just for the doctest, why not int?

Am 28/07/15 um 13:43 schrieb Martin K. Scherer:

seems like that. So maybe we should pin it down to 32bits?

— Reply to this email directly or view it on GitHub https://github.com/markovmodel/msmtools/issues/40#issuecomment-125570405.


Prof. Dr. Frank Noe Head of Computational Molecular Biology group Freie Universitaet Berlin

Phone: (+49) (0)30 838 75354 Web: research.franknoe.de

Mail: Arnimallee 6, 14195 Berlin, Germany

marscher commented 9 years ago

So we always use int64 for dtrajs, but the difference with the doctest is, that on Python3.4 Numpy spits out the dtype, which is not the case for 2.7 Numpy.

marscher commented 9 years ago

will fix that.