#4206: [with patch, needs work] convert RDF and CDF vectors to use numpy
----------------------------+-----------------------------------------------
Reporter: jason | Owner: jason
Type: enhancement | Status: assigned
Priority: major | Milestone: sage-3.2.2
Component: linear algebra | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Changes (by mabshoff):
* summary: [with patch, positive review] convert RDF and CDF vectors to
use numpy => [with patch, needs work] convert
RDF and CDF vectors to use numpy
Comment:
This patch needs doctest fixes. This is on sage.math:
{{{
sage -t -long "devel/sage/sage/finance/fractal.pyx"
drfft:howmany=726335489
drfft:howmany=644245095
**********************************************************************
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/devel/sage/sage/finance/fractal.pyx", line 109, in
__main__.example_1
Failed example:
sim = finance.stationary_gaussian_simulation(s, N)[Integer(0)]###line
66:_sage_ >>> sim = finance.stationary_gaussian_simulation(s, N)[0]
Exception raised:
Traceback (most recent call last):
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/local/bin/ncadoctest.py", line 1231, in
run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/local/bin/ncadoctest.py", line 1172, in
run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_1[6]>", line 1, in <module>
sim = finance.stationary_gaussian_simulation(s,
N)[Integer(0)]###line 66:_sage_ >>> sim =
finance.stationary_gaussian_simulation(s, N)[0]
File "fractal.pyx", line 111, in
sage.finance.fractal.stationary_gaussian_simulation
(sage/finance/fractal.c:642)
File "time_series.pyx", line 2172, in
sage.finance.time_series.TimeSeries.fft (sage/finance/time_series.c:12114)
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/local/lib/python2.5/site-
packages/scipy/fftpack/basic.py", line 179, in rfft
return _raw_fft(tmp,n,axis,1,overwrite_x,work_function)
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/local/lib/python2.5/site-
packages/scipy/fftpack/basic.py", line 49, in _raw_fft
r = work_function(x,n,direction,overwrite_x=overwrite_x)
error: (n*howmany==size(x)) failed for hidden howmany
**********************************************************************
<SNIP>
}}}
And
{{{
sage -t -long "devel/sage/sage/finance/time_series.pyx"
**********************************************************************
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/devel/sage/sage/finance/time_series.pyx", line
427, in __main__.example_15
Failed example:
F = v.autoregressive_fit(Integer(100))###line 532:_sage_ >>> F =
v.autoregressive_fit(100)
Exception raised:
Traceback (most recent call last):
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/local/bin/ncadoctest.py", line 1231, in
run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/scratch/mabshoff/release-
cycle/sage-3.2.2.alpha1/local/bin/ncadoctest.py", line 1172, in
run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_15[4]>", line 1, in <module>
F = v.autoregressive_fit(Integer(100))###line 532:_sage_ >>> F
= v.autoregressive_fit(100)
File "time_series.pyx", line 557, in
sage.finance.time_series.TimeSeries.autoregressive_fit
(sage/finance/time_series.c:4388)
File "time_series.pyx", line 2378, in
sage.finance.time_series.autoregressive_fit
(sage/finance/time_series.c:12648)
File "time_series.pyx", line 1865, in
sage.finance.time_series.TimeSeries.numpy
(sage/finance/time_series.c:10977)
MemoryError
**********************************************************************
<SNIP>
}}}
Cheers,
Michael
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4206#comment:47>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---