Ticket #10792: trac-10792-riemann-complexwarnings.patch

File trac-10792-riemann-complexwarnings.patch, 1.0 KB (added by jason, 9 years ago)
  • sage/calculus/riemann.pyx

    # HG changeset patch
    # User Jason Grout <jason.grout@drake.edu>
    # Date 1298399136 21600
    # Node ID ab0bd48730a62e8eaa668b010b8682380abc8e8a
    # Parent  f24ce048fa66831e9e99df553e2be055c7081bbe
    #10792: fix warnings and errors from an upgrade to numpy 1.5.1
    
    diff -r f24ce048fa66 -r ab0bd48730a6 sage/calculus/riemann.pyx
    a b  
    454455                p_vector[k, N] = (I / (3*N) * dps[k, 0] *
    455456                                  exp(I * theta_array[k, 0]))
    456457        self.p_vector = p_vector.flatten()
    457         temp = np.zeros([self.B, 1])
    458         for k in xrange(self.B):
    459             temp[k, 0] = self.cps[k, 0]
    460         cdef np.ndarray[double complex, ndim=1] pq = np.concatenate(
    461             [self.cps, temp], axis=1).flatten()
     458        cdef np.ndarray[double complex, ndim=1] pq = self.cps[:,list(range(N))+[0]].flatten()
    462459        self.pre_q_vector = pq
    463460
    464461    cpdef riemann_map(self, pt):