Skip to content
Snippets Groups Projects
Commit 9ad53110 authored by Bas Couwenberg's avatar Bas Couwenberg
Browse files

Add upstream patch to fix test failure with Numpy 1.24.

parent fc7347a5
No related branches found
No related tags found
No related merge requests found
Pipeline #483737 passed with warnings with stages
in 31 minutes and 32 seconds
......@@ -2,6 +2,7 @@ veusz (3.5.3-2) UNRELEASED; urgency=medium
* Team upload.
* Update gbp.conf to use pristine-tar & --source-only-changes by default.
* Add upstream patch to fix test failure with Numpy 1.24.
-- Bas Couwenberg <sebastic@debian.org> Thu, 12 Jan 2023 18:19:59 +0100
......
Description: Replace removed type definitions in numpy
Author: Jeremy Sanders <jeremy@jeremysanders.net>
Origin: https://github.com/veusz/veusz/commit/f93cf7ac0a1d93902524f38efbb58c4f0d016caa
Forwarded: not-needed
--- a/veusz/datasets/filtered.py
+++ b/veusz/datasets/filtered.py
@@ -104,7 +104,7 @@ class DatasetFilterGenerator:
return [
_("Input filter expression non-numeric: '%s'") % self.inexpr]
- filterarr = d.data.astype(N.bool)
+ filterarr = d.data.astype(N.bool_)
if self.invert:
filterarr = N.logical_not(filterarr)
--- a/veusz/plugins/datasetplugin.py
+++ b/veusz/plugins/datasetplugin.py
@@ -780,8 +780,8 @@ class InterleaveDatasetPlugin(_OneOutput
ds = [ N.hstack( (d, N.zeros(maxlength-len(d))) )
for d in datasets ]
# which elements are valid
- good = [ N.hstack( (N.ones(len(d), dtype=N.bool),
- N.zeros(maxlength-len(d), dtype=N.bool)) )
+ good = [ N.hstack( (N.ones(len(d), dtype=N.bool_),
+ N.zeros(maxlength-len(d), dtype=N.bool_)) )
for d in datasets ]
intl = N.column_stack(ds).reshape(maxlength*len(datasets))
@@ -966,7 +966,7 @@ class MeanDatasetPlugin(_OneOutputDatase
# mean data (only use finite values)
tot = N.zeros(maxlength, dtype=N.float64)
- num = N.zeros(maxlength, dtype=N.int)
+ num = N.zeros(maxlength, dtype=N.int_)
for d in inds:
f = N.isfinite(d.data)
tot[:len(d.data)][f] += d.data[f]
@@ -976,7 +976,7 @@ class MeanDatasetPlugin(_OneOutputDatase
def averageError(errtype, fallback=None):
"""Get average for an error value."""
tot = N.zeros(maxlength, dtype=N.float64)
- num = N.zeros(maxlength, dtype=N.int)
+ num = N.zeros(maxlength, dtype=N.int_)
for d in inds:
vals = getattr(d, errtype)
if vals is None and fallback:
@@ -1030,7 +1030,7 @@ class AddDatasetsPlugin(_OneOutputDatase
# add data where finite
data = N.zeros(maxlength, dtype=N.float64)
- anyfinite = N.zeros(maxlength, dtype=N.bool)
+ anyfinite = N.zeros(maxlength, dtype=N.bool_)
for d in inds:
f = N.isfinite(d.data)
data[:len(d.data)][f] += d.data[f]
@@ -1213,7 +1213,7 @@ class MultiplyDatasetsPlugin(_OneOutputD
# output data and where data is finite
data = N.ones(maxlength, dtype=N.float64)
- anyfinite = N.zeros(maxlength, dtype=N.bool)
+ anyfinite = N.zeros(maxlength, dtype=N.bool_)
for d in inds:
f = N.isfinite(d.data)
anyfinite[f] = True
@@ -1386,7 +1386,7 @@ class ExtremesDatasetPlugin(DatasetPlugi
minvals = N.zeros(maxlength, dtype=N.float64) + 1e100
maxvals = N.zeros(maxlength, dtype=N.float64) - 1e100
- anyfinite = N.zeros(maxlength, dtype=N.bool)
+ anyfinite = N.zeros(maxlength, dtype=N.bool_)
for d in inds:
f = N.isfinite(d.data)
anyfinite[f] = True
@@ -1417,7 +1417,7 @@ class ExtremesDatasetPlugin(DatasetPlugi
if self.dserror is not None:
# compute mean and look at differences from it
tot = N.zeros(maxlength, dtype=N.float64)
- num = N.zeros(maxlength, dtype=N.int)
+ num = N.zeros(maxlength, dtype=N.int_)
for d in inds:
f = N.isfinite(d.data)
tot[f] += d.data[f]
@@ -1594,10 +1594,10 @@ class FilterDatasetPlugin(_OneOutputData
if filt is None:
# select nothing
- filt = N.zeros(data.shape, dtype=N.bool)
+ filt = N.zeros(data.shape, dtype=N.bool_)
else:
# filter must have int/bool type
- filt = N.array(filt, dtype=N.bool)
+ filt = N.array(filt, dtype=N.bool_)
try:
if fields['replacenan']:
remove-searchindex.diff
replace-removed-type-definitions-in-numpy.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment