[pynfft] 02/12: Fix FTBFS with NFFT 3.3.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Fri Feb 12 09:39:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository pynfft.

commit 3dee944c14a4c99b7bf293b3ea844e5425e71fbc
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Thu Feb 11 09:59:50 2016 +0000

    Fix FTBFS with NFFT 3.3.
---
 .../patches/Fix-compatibility-with-NFFT-3.3.patch  | 121 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 2 files changed, 122 insertions(+)

diff --git a/debian/patches/Fix-compatibility-with-NFFT-3.3.patch b/debian/patches/Fix-compatibility-with-NFFT-3.3.patch
new file mode 100644
index 0000000..6cd53cb
--- /dev/null
+++ b/debian/patches/Fix-compatibility-with-NFFT-3.3.patch
@@ -0,0 +1,121 @@
+From: Ghislain Antony Vaillant <ghisvail at gmail.com>
+Date: Thu, 11 Feb 2016 09:59:02 +0000
+Subject: Fix compatibility with NFFT 3.3.
+
+---
+ pynfft/cnfft3.pxd     |  9 +++++++++
+ pynfft/cnfft3util.pxd | 34 ----------------------------------
+ pynfft/util.pyx       | 35 +----------------------------------
+ 3 files changed, 10 insertions(+), 68 deletions(-)
+ delete mode 100644 pynfft/cnfft3util.pxd
+
+diff --git a/pynfft/cnfft3.pxd b/pynfft/cnfft3.pxd
+index 3e2424d..89da296 100644
+--- a/pynfft/cnfft3.pxd
++++ b/pynfft/cnfft3.pxd
+@@ -142,6 +142,15 @@ cdef extern from "nfft3.h":
+         # Destroys the plan for the inverse transform.
+ 
+ 
++    # Utilities
++    void nfft_vrand_unit_complex (fftw_complex *x, int n)
++        # Inits a vector of random complex numbers in \
++        # $[0,1]\times[0,1]{\rm i}$ .
++
++    void nfft_vrand_shifted_unit_double (double *x, int n)
++        # Inits a vector of random double numbers in $[-1/2,1/2]$ .
++
++
+ cdef extern from "fftw3.h":
+     
+     void fftw_cleanup()
+diff --git a/pynfft/cnfft3util.pxd b/pynfft/cnfft3util.pxd
+deleted file mode 100644
+index 5dbdd18..0000000
+--- a/pynfft/cnfft3util.pxd
++++ /dev/null
+@@ -1,34 +0,0 @@
+-# -*- coding: utf-8 -*-
+-#
+-# Copyright (C) 2013  Ghislain Vaillant
+-#
+-# This program is free software: you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 3 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+-from cnfft3 cimport fftw_complex
+-
+-cdef extern from "nfft3util.h":
+-
+-    void nfft_vrand_unit_complex (fftw_complex *x, int n)
+- 	    # Inits a vector of random complex numbers in \
+-        # $[0,1]\times[0,1]{\rm i}$ .
+-
+-    void nfft_vrand_shifted_unit_double (double *x, int n)
+-        # Inits a vector of random double numbers in $[-1/2,1/2]$ .
+-
+-    void nfft_voronoi_weights_1d (double *w, double *x, int M)
+- 	    # Computes non periodic voronoi weights, \
+-        # assumes ordered nodes $x_j$.
+-
+-    void nfft_voronoi_weights_S2(double *w, double *xi, int M)
+-        # Computes voronoi weights for nodes on the sphere S^2. */
+diff --git a/pynfft/util.pyx b/pynfft/util.pyx
+index e03cf56..c176b33 100644
+--- a/pynfft/util.pyx
++++ b/pynfft/util.pyx
+@@ -17,7 +17,7 @@
+ 
+ import numpy as np
+ cimport numpy as np
+-from cnfft3util cimport *
++from cnfft3 cimport *
+ 
+ 
+ # Numpy must be initialized. When using numpy from C or Cython you must
+@@ -48,36 +48,3 @@ def vrand_shifted_unit_double (object[np.float64_t, mode='c'] x not None):
+     :type x: ndarray <float64>
+     '''
+     nfft_vrand_shifted_unit_double(<double *>&x[0], x.size)
+-
+-def voronoi_weights_1d (object[np.float64_t, mode='c'] w not None,
+-                        object[np.float64_t, mode='c'] x not None):
+-    '''
+-    Utilitary function for computing density compensation weights from 1D knots.
+-
+-    :param w: pre-allocated array
+-    :type w: ndarray <float64>
+-    :param x: ordered 1D knots
+-    :type x: ndarray <float64>
+-    '''
+-    if x.size != w.size:
+-        raise ValueError('Incompatible size between weights and nodes \
+-                         (%d, %d)'%(w.size, x.size))
+-    nfft_voronoi_weights_1d(<double *>&w[0], <double *>&x[0], w.size)
+-
+-def voronoi_weights_S2 (object[np.float64_t, mode='c'] w not None,
+-                        object[np.float64_t, mode='c'] xi not None):
+-    '''
+-    Utilitary function for computing density compensation weights from knots
+-    located on the surface of a sphere.
+-
+-    Useful for reconstruction of 3D radial data.
+-
+-    :param w: pre-allocated array
+-    :type w: ndarray <float64>
+-    :param xi: angular locations (2D) on the unit sphere
+-    :type xi: ndarray <float64>
+-    '''
+-    if xi.size != 2 * w.size:
+-        raise ValueError('Incompatible size between weights and nodes \
+-                         (%d, %d)'%(w.size, xi.size))
+-    nfft_voronoi_weights_S2(<double *>&w[0], <double *>&xi[0], w.size)
diff --git a/debian/patches/series b/debian/patches/series
index 804c6a1..6f8b8d9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 no-malign-double.diff
+Fix-compatibility-with-NFFT-3.3.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pynfft.git



More information about the debian-science-commits mailing list