#10764: Cleanup cython warnings
------------------------+---------------------------------------------------
Reporter: robertwb | Owner: GeorgSWeber
Type: task | Status: new
Priority: major | Milestone: sage-4.7
Component: build | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Comment(by fbissey):
I am looking at gsl/fft.pyx and some of the code is strange
{{{
def __getitem__(self, size_t i):
if i < 0 or i >= self.n:
raise IndexError
cdef int j
j = 2*i
return self.data[2*i], self.data[2*i+1]
def __getslice__(self, Py_ssize_t i, Py_ssize_t j):
# Todo -- make this actually fast.
return list(self)[i:j]
}}}
There is already a getitem, I don't think it would work with slices. But
getitem and getslice look very different. One asks for size_t while the
other asks for Py_ssize_t I assume one is deprecated. The code in getitem
is very strange. j is declared, computed and never used, the code also
return something different from you would naively expect. None of this
seem to ever be called from anywhere else in sage.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10764#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.