Ticket #3356: trac_3356_doctest_fixes.patch

File trac_3356_doctest_fixes.patch, 2.0 KB (added by mabshoff, 14 years ago)

This patch fixes the numerical noise doctest issues and one mismerge by me

  • sage/finance/time_series.pyx

    # HG changeset patch
    # User mabshoff@sage.math.washington.edu
    # Date 1215373840 25200
    # Node ID 5c69ddf3ac9b9c6f7026cc0171baa9a4ea080988
    # Parent  60367437639ac3b7723f1dafbabf492fd9b32a69
    Fix some doctest failures due to #3356
    
    diff -r 60367437639a -r 5c69ddf3ac9b sage/finance/time_series.pyx
    a b cdef class TimeSeries: 
    523523            sage: v
    524524            [0.6767, 0.2756, 0.6332, 0.0469, -0.8897 ... 87.6759, 87.6825, 87.4120, 87.6639, 86.3194]
    525525            sage: v.linear_forecast(F)
    526             86.017728504280015
     526            86.0177285042...
    527527            sage: F
    528528            [1.0148, -0.0029, -0.0105, 0.0067, -0.0232 ... -0.0106, -0.0068, 0.0085, -0.0131, 0.0092]
    529529        """
    cdef class TimeSeries: 
    14261426            sage: set_random_seed(0)
    14271427            sage: fbm = finance.fractional_brownian_motion_simulation(0.7,0.1,10^5,1)[0].sums()
    14281428            sage: fbm.hurst_exponent()
    1429             0.66787027921443409
     1429            0.667870279214...
    14301430
    14311431        Another example with small Hurst exponent (notice how bad the prediction is...):
    14321432            sage: fbm = finance.fractional_brownian_motion_simulation(0.2,0.1,10^5,1)[0].sums()
    14331433            sage: fbm.hurst_exponent()
    1434             0.30450273560706259
     1434            0.30450273560706...
    14351435
    14361436        The above example illustrate that this is not a very good
    14371437        estimate of the Hurst exponent.
  • sage/matrix/matrix_space.py

    diff -r 60367437639a -r 5c69ddf3ac9b sage/matrix/matrix_space.py
    a b class MatrixSpace_generic(parent_gens.Pa 
    651651          both) are zero, then the single element of the space is returned.
    652652
    653653            sage: list( MatrixSpace(GF(2), 2, 0) )
    654             [[]
    655             []]
     654            [[]]
    656655            sage: list( MatrixSpace(GF(2), 0, 2) )
    657656            [[]]
    658657            sage: list( MatrixSpace(GF(2), 0, 0) )