#4491: finance.TimeSeries from numpy array doesn't work correctly
---------------------+------------------------------------------------------
Reporter: ghtdak | Owner: jason
Type: defect | Status: assigned
Priority: minor | Milestone: sage-3.2.2
Component: finance | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Old description:
> Looks like initializing a TimeSeries from a column of a numpy array
> doesn't work properly
>
> {{{
> testp.shape
> }}}
> (373389, 4)
> {{{
> t1=finance.TimeSeries(testp[:,3]); t1 # wrong
> }}}
>
> [962.5000, 1225742099742.0000, 4.0000, 4.0000, 962.5000 ... 999.2500,
> 1225850900622.0000, 4.0000, 5.0000, 999.2500]
> {{{
> t1=finance.TimeSeries(testp[:,3].tolist()); t1 # correct
> }}}
> [962.5000, 962.5000, 962.5000, 962.5000, 962.5000 ... 954.5000,
> 954.5000, 954.5000, 954.5000, 954.5000]
New description:
Looks like initializing a TimeSeries from a column of a numpy array
doesn't work properly
{{{
testp.shape
(373389, 4)
t1=finance.TimeSeries(testp[:,3]); t1 # wrong
[962.5000, 1225742099742.0000, 4.0000, 4.0000, 962.5000 ... 999.2500,
1225850900622.0000, 4.0000, 5.0000, 999.2500]
t1=finance.TimeSeries(testp[:,3].tolist()); t1 # correct
[962.5000, 962.5000, 962.5000, 962.5000, 962.5000 ... 954.5000,
954.5000, 954.5000, 954.5000, 954.5000]
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4491#comment:7>
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
-~----------~----~----~----~------~----~------~--~---