Ticket #8547: trac_8547-take2-part3.patch

File trac_8547-take2-part3.patch, 1.0 KB (added by was, 12 years ago)
  • sage/stats/intlist.pyx

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1270927125 25200
    # Node ID 44042eb22a89f08124c2f7c8f99ebf113905734a
    # Parent  3b663ff7aae85cc171f09923eecdc15c5bde9c75
    trac 8547 -- part 3 -- implement hidden markov models in Cython from scratch; a tiny fix to deal with a missing doctest
    
    diff -r 3b663ff7aae8 -r 44042eb22a89 sage/stats/intlist.pyx
    a b  
    322322       
    323323        EXAMPLES::
    324324       
    325             sage: stats.IntList([1..100]).sum()                                                               
     325            sage: stats.IntList([1..100]).sum()
    326326            5050
    327327           
    328328        Note that there can be overflow, since the entries are C ints::
    329329
    330330            sage: a = stats.IntList([2^30,2^30]); a
    331331            [1073741824, 1073741824]
     332            sage: a.sum()
     333            -2147483648
    332334        """
    333335        cdef Py_ssize_t i
    334336        cdef int s=0