Ticket #4206: timeseries-64bit.patch

File timeseries-64bit.patch, 855 bytes (added by jason, 4 years ago)

apply on top of previous patches

  • sage/finance/time_series.pyx

    # HG changeset patch
    # User Jason Grout <jason-sage@creativetrax.com>
    # Date 1228812059 21600
    # Node ID 63eb9b2e1e4490a54a81a3f88cfd9020e66c5bd8
    # Parent  15d931d55fe1d4e76bb90e5a197e8f0cdcae46f5
    Fixed a 64-bit issue with ints and numpy C API.
    
    diff -r 15d931d55fe1 -r 63eb9b2e1e44 sage/finance/time_series.pyx
    a b  
    18581858            [20.0000, -3.0000, 4.5000, -2.0000] 
    18591859        """ 
    18601860        cnumpy.import_array() #This must be called before using the numpy C/api or you will get segfault 
    1861         cdef int dims[1] 
     1861        cdef cnumpy.npy_intp dims[1] 
    18621862        dims[0] = self._length 
    18631863        cdef cnumpy.ndarray n = cnumpy.PyArray_SimpleNewFromData(1, dims, cnumpy.NPY_DOUBLE, self._values) 
    18641864        if copy: