Hello community,
here is the log from the commit of package python-photutils for
openSUSE:Factory checked in at 2020-08-14 13:11:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-photutils (Old)
and /work/SRC/openSUSE:Factory/.python-photutils.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-photutils"
Fri Aug 14 13:11:42 2020 rev:8 rq:826649 version:0.7.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-photutils/python-photutils.changes
2020-07-18 21:01:33.443518337 +0200
+++
/work/SRC/openSUSE:Factory/.python-photutils.new.3399/python-photutils.changes
2020-08-14 13:11:47.653266544 +0200
@@ -1,0 +2,6 @@
+Fri Aug 14 09:13:48 UTC 2020 - Benjamin Greiner <[email protected]>
+
+- add photutils-pr1041-update-watershed-import.patch to fix failing
+ test gh#astropy/photutils#1041
+
+-------------------------------------------------------------------
New:
----
photutils-pr1041-update-watershed-import.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-photutils.spec ++++++
--- /var/tmp/diff_new_pack.rJjvXa/_old 2020-08-14 13:11:48.893267017 +0200
+++ /var/tmp/diff_new_pack.rJjvXa/_new 2020-08-14 13:11:48.893267017 +0200
@@ -27,6 +27,7 @@
URL: https://github.com/astropy/photutils
Source:
https://files.pythonhosted.org/packages/source/p/photutils/photutils-%{version}.tar.gz
Patch0:
https://github.com/astropy/photutils/pull/1014.patch#/0001-aperture-mask-test-assert-almost-equal.patch
+Patch1:
https://github.com/astropy/photutils/pull/1041.patch#/photutils-pr1041-update-watershed-import.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel >= 1.13}
BuildRequires: %{python_module setuptools}
@@ -55,7 +56,7 @@
%prep
%setup -q -n photutils-%{version}
-%patch0 -p1
+%autopatch -p1
%build
export CFLAGS="%{optflags}"
++++++ photutils-pr1041-update-watershed-import.patch ++++++
>From 262d9b6ec74217bf635c0cfbbb04bb81136f41cc Mon Sep 17 00:00:00 2001
From: Larry Bradley <[email protected]>
Date: Thu, 21 May 2020 19:00:11 -0400
Subject: [PATCH 1/2] Update watershed import
---
photutils/segmentation/deblend.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/photutils/segmentation/deblend.py
b/photutils/segmentation/deblend.py
index 9d964f10b..f45d13951 100644
--- a/photutils/segmentation/deblend.py
+++ b/photutils/segmentation/deblend.py
@@ -219,7 +219,7 @@ def _deblend_source(data, segment_img, npixels, nlevels=32,
contrast=0.001,
"""
from scipy.ndimage import label as ndilabel
- from skimage.morphology import watershed
+ from skimage.segmentation import watershed
if nlevels < 1:
raise ValueError('nlevels must be >= 1, got "{0}"'.format(nlevels))
>From 8406c5a03edd1272d0cb84bfceef559e1548cbb1 Mon Sep 17 00:00:00 2001
From: Larry Bradley <[email protected]>
Date: Thu, 21 May 2020 19:40:04 -0400
Subject: [PATCH 2/2] Fix RandomState sphinx references
---
photutils/datasets/make.py | 8 ++++----
photutils/isophote/tests/make_test_data.py | 2 +-
photutils/segmentation/core.py | 2 +-
photutils/utils/check_random_state.py | 12 ++++++------
photutils/utils/colormaps.py | 2 +-
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/photutils/datasets/make.py b/photutils/datasets/make.py
index 99fd5ee67..b6b1f0733 100644
--- a/photutils/datasets/make.py
+++ b/photutils/datasets/make.py
@@ -43,7 +43,7 @@ def apply_poisson_noise(data, random_state=None):
The array on which to apply Poisson noise. Every pixel in the
array must have a positive value (i.e. counts).
- random_state : int or `~numpy.random.mtrand.RandomState`, optional
+ random_state : int or `~numpy.random.RandomState`, optional
Pseudo-random number generator state used for random sampling.
Returns
@@ -109,7 +109,7 @@ def make_noise_image(shape, distribution='gaussian',
mean=None, stddev=None,
Poisson noise (the variance of the Poisson distribution is equal
to its mean).
- random_state : int or `~numpy.random.mtrand.RandomState`, optional
+ random_state : int or `~numpy.random.RandomState`, optional
Pseudo-random number generator state used for random sampling.
Separate function calls with the same noise parameters and
``random_state`` will generate the identical noise image.
@@ -184,7 +184,7 @@ def make_random_models_table(n_sources, param_ranges,
random_state=None):
as a `dict` mapping the parameter name to its ``(lower, upper)``
bounds.
- random_state : int or `~numpy.random.mtrand.RandomState`, optional
+ random_state : int or `~numpy.random.RandomState`, optional
Pseudo-random number generator state used for random sampling.
Returns
@@ -274,7 +274,7 @@ def make_random_gaussians_table(n_sources, param_ranges,
random_state=None):
ignored. Model parameters not defined in ``param_ranges`` will
be set to the default value.
- random_state : int or `~numpy.random.mtrand.RandomState`, optional
+ random_state : int or `~numpy.random.RandomState`, optional
Pseudo-random number generator state used for random sampling.
Returns
diff --git a/photutils/isophote/tests/make_test_data.py
b/photutils/isophote/tests/make_test_data.py
index 2cfcbc594..e9d252506 100644
--- a/photutils/isophote/tests/make_test_data.py
+++ b/photutils/isophote/tests/make_test_data.py
@@ -34,7 +34,7 @@ def make_test_image(nx=512, ny=512, x0=None, y0=None,
The ellipticity of the reference isophote.
pa : float, optional
The position angle of the reference isophote.
- random_state : int or `~numpy.random.mtrand.RandomState`, optional
+ random_state : int or `~numpy.random.RandomState`, optional
Pseudo-random number generator state used for random sampling.
Separate function calls with the same ``random_state`` will
generate the identical noise image.
diff --git a/photutils/segmentation/core.py b/photutils/segmentation/core.py
index ecb251fe2..81274d6b3 100644
--- a/photutils/segmentation/core.py
+++ b/photutils/segmentation/core.py
@@ -548,7 +548,7 @@ def make_cmap(self, background_color='#000000',
random_state=None):
background color (label = 0) when plotting the segmentation
array. The default is black ('#000000').
- random_state : int or `~numpy.random.mtrand.RandomState`, optional
+ random_state : int or `~numpy.random.RandomState`, optional
The pseudo-random number generator state used for random
sampling. Separate function calls with the same
``random_state`` will generate the same colormap.
diff --git a/photutils/utils/check_random_state.py
b/photutils/utils/check_random_state.py
index e81e21764..ffbaf526c 100644
--- a/photutils/utils/check_random_state.py
+++ b/photutils/utils/check_random_state.py
@@ -12,22 +12,22 @@
def check_random_state(seed):
"""
- Turn seed into a `numpy.random.mtrand.RandomState` instance.
+ Turn seed into a `numpy.random.RandomState` instance.
Parameters
----------
- seed : `None`, int, or `numpy.random.mtrand.RandomState`
+ seed : `None`, int, or `numpy.random.RandomState`
If ``seed`` is `None`, return the
- `~numpy.random.mtrand.RandomState` singleton used by
+ `~numpy.random.RandomState` singleton used by
``numpy.random``. If ``seed`` is an `int`, return a new
- `~numpy.random.mtrand.RandomState` instance seeded with
+ `~numpy.random.RandomState` instance seeded with
``seed``. If ``seed`` is already a
- `~numpy.random.mtrand.RandomState`, return it. Otherwise raise
+ `~numpy.random.RandomState`, return it. Otherwise raise
``ValueError``.
Returns
-------
- random_state : `numpy.random.mtrand.RandomState`
+ random_state : `numpy.random.RandomState`
RandomState object.
Notes
diff --git a/photutils/utils/colormaps.py b/photutils/utils/colormaps.py
index b15043a64..904f60365 100644
--- a/photutils/utils/colormaps.py
+++ b/photutils/utils/colormaps.py
@@ -21,7 +21,7 @@ def make_random_cmap(ncolors=256, random_state=None):
ncolors : int, optional
The number of colors in the colormap. The default is 256.
- random_state : int or `~numpy.random.mtrand.RandomState`, optional
+ random_state : int or `~numpy.random.RandomState`, optional
The pseudo-random number generator state used for random
sampling. Separate function calls with the same
``random_state`` will generate the same colormap.