On Fri, May 9, 2014 at 12:12 PM, Jesse Hersch <[email protected]> wrote: > On Thursday, May 8, 2014 5:59:10 PM UTC-7, William wrote: >> >> > Do you recall if you handled the underflow problem in your >> > implementation? >> >> I believe it does not. >> >> > I haven't studied the code yet, but it seems like this could be the >> > culprit. >> >> I think you're right. You should implement it! > > > I had a look at the code an it appears that it is already handling the > underflow problem. > > The scaling factors are computed in _forward_scale_all() and used in both > _forward_scale_all() and _backward_scale_all(). Also _viterbi_scale() is > using log probabilities to avoid underflow in products of small > probabilities. > > So I need to dig deeper. btw I am new to both sage and cython. I am eager > to find the cause and fix this though. So here's my question: > > If I make a change to hmm.pyx, how do I get sage to pick up that change > without having to rebuild all of sage from source? (that took a few hours).
"./sage -br", as Lief said. By the way, 10 minutes ago I just gave a very, very basic lecture on Cython, which will appear here shortly: http://youtu.be/YrO89QIizxI > > I read here that I can "attach" a .pyx file which should force a cython > recompilation of hte file whenever the .pyx file is changed. Is that right? > http://www.sagemath.org/doc/developer/coding_in_cython.html#attaching-or-loading-spyx-files > > I tried that and got a syntax error: > > sage: attach "/home/jhersch/bin/sage-6.2/src/sage/stats/hmm/hmm.pyx" > File "<ipython-input-4-162f4bbc7027>", line 1 > attach "/home/jhersch/bin/sage-6.2/src/sage/stats/hmm/hmm.pyx" > ^ > SyntaxError: invalid syntax > > > What is the usual way sage developers go about making changes in cython code > without rebuilding everything? > > Thanks! > > Jesse > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
