Jan Groenewald wrote:
> Hi
>
> Ubuntu jaunty 64bit, sage 4.1 built from source tarball.
>
> During sage -upgrade (from a mirror)
>
> <snip>
> python `which cython` --embed-positions --incref-local-binop
> -I/usr/local/src/sage-4.1/devel/sage-main -o sage/finance/time_series.c
> sage/finance/time_series.pyx
> warning:
> /usr/local/src/sage-4.1/devel/sage-main/sage/finance/time_series.pyx:1722:24:
> cdef variable 'j' declared after it is used
Interesting. We have in that function:
v = [(mn + j*step, mn + (j+1)*step) for j in range(bins)]
and then a few lines later:
cdef Py_ssize_t j
That's probably a bad idea. The cdef line should be above that first line.
There's a patch up at http://trac.sagemath.org/sage_trac/ticket/6824
that fixes this. Reviewers for this simple fix are welcome!
>
> Error converting Pyrex file to C:
> ------------------------------------------------------------
> ...
> [20.0000, -3.0000, 4.5000, -2.0000]
> """
> cnumpy.import_array() #This must be called before using the numpy
> C/api or you will get segfault
> cdef cnumpy.npy_intp dims[1]
> dims[0] = self._length
> cdef cnumpy.ndarray n = cnumpy.PyArray_SimpleNewFromData(1, dims,
> cnumpy.NPY_DOUBLE, self._values)
> ^
> ------------------------------------------------------------
>
> /usr/local/src/sage-4.1/devel/sage-main/sage/finance/time_series.pyx:1862:72:
> Cannot convert 'numpy.npy_intp [1]' to Python object
>
> Error converting Pyrex file to C:
> ------------------------------------------------------------
> ...
> [20.0000, -3.0000, 4.5000, -2.0000]
> """
> cnumpy.import_array() #This must be called before using the numpy
> C/api or you will get segfault
> cdef cnumpy.npy_intp dims[1]
> dims[0] = self._length
> cdef cnumpy.ndarray n = cnumpy.PyArray_SimpleNewFromData(1, dims,
> cnumpy.NPY_DOUBLE, self._values)
>
> ^
> ------------------------------------------------------------
>
> /usr/local/src/sage-4.1/devel/sage-main/sage/finance/time_series.pyx:1862:97:
> Cannot convert 'double *' to Python object
> Error running command, failed with status 256.
> sage: There was an error installing modified sage library code.
I looked at the sources briefly and nothing looked out of the ordinary.
I'm wondering if somehow the new Cython was not installed at this
point in the build process, so somehow an old numpy pxd file was being
used. I don't know.
>
> Should I be getting a brand new tarball to build from?
> This is the first sage -upgrade that has failed for me.
A new tarball worked for me. I didn't upgrade. But then again, I'm not
on a 64-bit system.
Thanks,
Jason
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---