[med-svn] [python-multipletau] 05/14: Drop obsoleted numpy_1.11.0.patch
Alex Mestiashvili
malex-guest at moszumanska.debian.org
Fri Oct 20 21:29:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
malex-guest pushed a commit to branch master
in repository python-multipletau.
commit ae8f4a77c4a1064c674a7812dfe259b594368859
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date: Fri Oct 20 14:15:03 2017 +0200
Drop obsoleted numpy_1.11.0.patch
---
debian/patches/numpy_1.11.0.patch | 142 --------------------------------------
1 file changed, 142 deletions(-)
diff --git a/debian/patches/numpy_1.11.0.patch b/debian/patches/numpy_1.11.0.patch
deleted file mode 100644
index 04c7e81..0000000
--- a/debian/patches/numpy_1.11.0.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-Description: fixes #813983, starting from Numpy 1.11.0
- "Indexing with floats raises IndexError, e.g., a[0, 0.0]."
-Author: upstream
---- python-multipletau.orig/multipletau/_multipletau.py
-+++ python-multipletau/multipletau/_multipletau.py
-@@ -136,11 +136,11 @@
- # Check parameters
- if np.around(m / 2) != m / 2:
- mold = 1 * m
-- m = int((np.around(m / 2) + 1) * 2)
-+ m = np.int((np.around(m / 2) + 1) * 2)
- warnings.warn("Invalid value of m={}. Using m={} instead"
- .format(mold, m))
- else:
-- m = int(m)
-+ m = np.int(m)
-
- N = N0 = len(trace)
-
-@@ -148,12 +148,12 @@
- # The integer k defines how many times we can average over
- # two neighboring array elements in order to obtain an array of
- # length just larger than m.
-- k = int(np.floor(np.log2(N / m)))
-+ k = np.int(np.floor(np.log2(N / m)))
-
- # In the base2 multiple-tau scheme, the length of the correlation
- # array is (only taking into account values that are computed from
- # traces that are just larger than m):
-- lenG = np.int(np.floor(m + k * m / 2))
-+ lenG = np.int(np.floor(m + k * m // 2))
-
- G = np.zeros((lenG, 2), dtype=dtype)
-
-@@ -182,12 +182,13 @@
- # Add up every second element
- trace = (trace[:N:2] + trace[1:N + 1:2]) / 2
- N /= 2
-+ N = np.int(N)
- # Start iteration for each m/2 values
- for step in range(1, k + 1):
- # Get the next m/2 values via correlation of the trace
-- for n in range(1, int(m / 2) + 1):
-- idx = int(m + n - 1 + (step - 1) * m / 2)
-- if len(trace[:N - (n + m / 2)]) == 0:
-+ for n in range(1, np.int(m // 2) + 1):
-+ idx = np.int(m + n - 1 + (step - 1) * m // 2)
-+ if len(trace[:N - (n + m // 2)]) == 0:
- # This is a shortcut that stops the iteration once the
- # length of the trace is too small to compute a corre-
- # lation. The actual length of the correlation function
-@@ -211,11 +212,11 @@
- # k in advance.
- break
- else:
-- G[idx, 0] = deltat * (n + m / 2) * 2**step
-+ G[idx, 0] = deltat * (n + m // 2) * 2**step
- # This is the computationally intensive step
-- G[idx, 1] = np.sum(trace[:N - (n + m / 2)] *
-- trace[(n + m / 2):], dtype=dtype)
-- normstat[idx] = N - (n + m / 2)
-+ G[idx, 1] = np.sum(trace[:N - (n + m // 2)] *
-+ trace[(n + m // 2):], dtype=dtype)
-+ normstat[idx] = N - (n + m // 2)
- normnump[idx] = N
- # Check if len(trace) is even:
- if N % 2 == 1:
-@@ -223,6 +224,7 @@
- # Add up every second element
- trace = (trace[:N:2] + trace[1:N + 1:2]) / 2
- N /= 2
-+ N = np.int(N)
-
- if normalize:
- G[:, 1] /= traceavg**2 * normstat
-@@ -334,11 +336,11 @@
- # Check parameters
- if np.around(m / 2) != m / 2:
- mold = 1 * m
-- m = int((np.around(m / 2) + 1) * 2)
-+ m = np.int((np.around(m / 2) + 1) * 2)
- warnings.warn("Invalid value of m={}. Using m={} instead"
- .format(mold, m))
- else:
-- m = int(m)
-+ m = np.int(m)
-
- if len(a) != len(v):
- raise ValueError("Input arrays must be of equal length.")
-@@ -348,12 +350,12 @@
- # The integer k defines how many times we can average over
- # two neighboring array elements in order to obtain an array of
- # length just larger than m.
-- k = int(np.floor(np.log2(N / m)))
-+ k = np.int(np.floor(np.log2(N / m)))
-
- # In the base2 multiple-tau scheme, the length of the correlation
- # array is (only taking into account values that are computed from
- # traces that are just larger than m):
-- lenG = np.int(np.floor(m + k * m / 2))
-+ lenG = np.int(np.floor(m + k * m // 2))
-
- G = np.zeros((lenG, 2), dtype=dtype)
- normstat = np.zeros(lenG, dtype=dtype)
-@@ -379,22 +381,23 @@
- trace1 = (trace1[:N:2] + trace1[1:N + 1:2]) / 2
- trace2 = (trace2[:N:2] + trace2[1:N + 1:2]) / 2
- N /= 2
-+ N = np.int(N)
-
- for step in range(1, k + 1):
- # Get the next m/2 values of the trace
-- for n in range(1, int(m / 2) + 1):
-- idx = int(m + n - 1 + (step - 1) * m / 2)
-- if len(trace1[:N - (n + m / 2)]) == 0:
-+ for n in range(1, np.int(m // 2) + 1):
-+ idx = np.int(m + n - 1 + (step - 1) * m // 2)
-+ if len(trace1[:N - (n + m // 2)]) == 0:
- # Abort
- G = G[:idx - 1]
- normstat = normstat[:idx - 1]
- normnump = normnump[:idx - 1]
- break
- else:
-- G[idx, 0] = deltat * (n + m / 2) * 2**step
-+ G[idx, 0] = deltat * (n + m // 2) * 2**step
- G[idx, 1] = np.sum(
-- trace1[:N - (n + m / 2)] * trace2[(n + m / 2):])
-- normstat[idx] = N - (n + m / 2)
-+ trace1[:N - (n + m // 2)] * trace2[(n + m // 2):])
-+ normstat[idx] = N - (n + m // 2)
- normnump[idx] = N
-
- # Check if len(trace) is even:
-@@ -404,6 +407,7 @@
- trace1 = (trace1[:N:2] + trace1[1:N + 1:2]) / 2
- trace2 = (trace2[:N:2] + trace2[1:N + 1:2]) / 2
- N /= 2
-+ N = np.int(N)
-
- if normalize:
- G[:, 1] /= traceavg1 * traceavg2 * normstat
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-multipletau.git
More information about the debian-med-commit
mailing list