forked from pool/python-astropy
Accepting request 1058279 from home:bnavigator:branches:devel:languages:python:numeric
- Update to 5.2.1 ## Bug Fixes ### astropy.coordinates * Fix to ITRS frame earth_location attribute to give the correct result for a topocentric frame. [#14180] ### astropy.cosmology * Bounds are no longer passed to the scipy minimizer for methods Brent and Golden. The scipy minimizer never used the bounds but silently accepted them. In scipy v1.11.0.dev0+ an error is raised, so we now pass None as the bounds to the minimizer. Users should not be affected by this change. [#14232] ### astropy.io.fits * Tables with multidimensional variable length array can now be properly read and written. [#13417] ### astropy.units * Modified the behavior of numpy.histogram(), numpy.histogram_bin_edges(), numpy.histogram2d(), and numpy.histogramdd() so that the range argument must a compatible instance of astropy.units.Quantity if the other arguments are instances of astropy.units.Quantity. [#14213] ### astropy.visualization * Improved the performance of drawing WCSAxes grids by skipping some unnecessary computations. [#14164] * Fixed WCSAxes sometimes triggering a NumPy RuntimeWarning when determining the coordinate range of the axes. [#14211] ## Other Changes and Additions * Fix compatibility with Numpy 1.24. [#14193] - Drop astropy-pr14194-numpy1.24.patch OBS-URL: https://build.opensuse.org/request/show/1058279 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-astropy?expand=0&rev=88
This commit is contained in:
parent
341c54a6fd
commit
0bfec80bf9
3
astropy-5.2.1.tar.gz
Normal file
3
astropy-5.2.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f6ae27a077f8ea84903efa76c790b985617341a0084b0d21c391f7a3f332ac23
|
||||
size 8284422
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d335604025f6e16f7c9bf82d5ba28e5db4745a82e5823a9d17bdd9b9bd46b2a2
|
||||
size 8281444
|
@ -1,90 +0,0 @@
|
||||
From 505533d3048e9193ea00a4eaae00490cc4f1c74d Mon Sep 17 00:00:00 2001
|
||||
From: "P. L. Lim" <2090236+pllim@users.noreply.github.com>
|
||||
Date: Mon, 19 Dec 2022 14:41:48 -0500
|
||||
Subject: [PATCH] Backport PR #14193: Fix compat with Numpy 1.24
|
||||
|
||||
---
|
||||
astropy/units/quantity.py | 5 +++++
|
||||
astropy/utils/compat/numpycompat.py | 2 +-
|
||||
astropy/utils/masked/function_helpers.py | 6 +++---
|
||||
3 files changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/astropy/units/quantity.py b/astropy/units/quantity.py
|
||||
index b98abfafb09..1a11625ae98 100644
|
||||
--- a/astropy/units/quantity.py
|
||||
+++ b/astropy/units/quantity.py
|
||||
@@ -1679,27 +1679,32 @@ def itemset(self, *args):
|
||||
self.view(np.ndarray).itemset(*(args[:-1] + (self._to_own_unit(args[-1]),)))
|
||||
|
||||
def tostring(self, order="C"):
|
||||
+ """Not implemented, use ``.value.tostring()`` instead."""
|
||||
raise NotImplementedError(
|
||||
"cannot write Quantities to string. Write array with"
|
||||
" q.value.tostring(...)."
|
||||
)
|
||||
|
||||
def tobytes(self, order="C"):
|
||||
+ """Not implemented, use ``.value.tobytes()`` instead."""
|
||||
raise NotImplementedError(
|
||||
"cannot write Quantities to bytes. Write array with q.value.tobytes(...)."
|
||||
)
|
||||
|
||||
def tofile(self, fid, sep="", format="%s"):
|
||||
+ """Not implemented, use ``.value.tofile()`` instead."""
|
||||
raise NotImplementedError(
|
||||
"cannot write Quantities to file. Write array with q.value.tofile(...)"
|
||||
)
|
||||
|
||||
def dump(self, file):
|
||||
+ """Not implemented, use ``.value.dump()`` instead."""
|
||||
raise NotImplementedError(
|
||||
"cannot dump Quantities to file. Write array with q.value.dump()"
|
||||
)
|
||||
|
||||
def dumps(self):
|
||||
+ """Not implemented, use ``.value.dumps()`` instead."""
|
||||
raise NotImplementedError(
|
||||
"cannot dump Quantities to string. Write array with q.value.dumps()"
|
||||
)
|
||||
diff --git a/astropy/utils/compat/numpycompat.py b/astropy/utils/compat/numpycompat.py
|
||||
index 0698ef6279f..9b744448668 100644
|
||||
--- a/astropy/utils/compat/numpycompat.py
|
||||
+++ b/astropy/utils/compat/numpycompat.py
|
||||
@@ -24,5 +24,5 @@
|
||||
NUMPY_LT_1_22 = not minversion(np, "1.22")
|
||||
NUMPY_LT_1_22_1 = not minversion(np, "1.22.1")
|
||||
NUMPY_LT_1_23 = not minversion(np, "1.23")
|
||||
-NUMPY_LT_1_24 = not minversion(np, "1.24dev0")
|
||||
+NUMPY_LT_1_24 = not minversion(np, "1.24")
|
||||
NUMPY_LT_1_25 = not minversion(np, "1.25.0.dev0+151")
|
||||
diff --git a/astropy/utils/masked/function_helpers.py b/astropy/utils/masked/function_helpers.py
|
||||
index eefd099ba4a..7440ec5b59f 100644
|
||||
--- a/astropy/utils/masked/function_helpers.py
|
||||
+++ b/astropy/utils/masked/function_helpers.py
|
||||
@@ -12,7 +12,7 @@
|
||||
import numpy as np
|
||||
|
||||
from astropy.units.quantity_helper.function_helpers import FunctionAssigner
|
||||
-from astropy.utils.compat import NUMPY_LT_1_23, NUMPY_LT_1_25
|
||||
+from astropy.utils.compat import NUMPY_LT_1_23, NUMPY_LT_1_24
|
||||
|
||||
# This module should not really be imported, but we define __all__
|
||||
# such that sphinx can typeset the functions with docstrings.
|
||||
@@ -587,7 +587,7 @@ def median(a, axis=None, out=None, **kwargs):
|
||||
|
||||
a = Masked(a)
|
||||
|
||||
- if NUMPY_LT_1_25:
|
||||
+ if NUMPY_LT_1_24:
|
||||
keepdims = kwargs.pop("keepdims", False)
|
||||
r, k = np.lib.function_base._ureduce(
|
||||
a, func=_masked_median, axis=axis, out=out, **kwargs
|
||||
@@ -643,7 +643,7 @@ def quantile(a, q, axis=None, out=None, **kwargs):
|
||||
if not np.lib.function_base._quantile_is_valid(q):
|
||||
raise ValueError("Quantiles must be in the range [0, 1]")
|
||||
|
||||
- if NUMPY_LT_1_25:
|
||||
+ if NUMPY_LT_1_24:
|
||||
keepdims = kwargs.pop("keepdims", False)
|
||||
r, k = np.lib.function_base._ureduce(
|
||||
a, func=_masked_quantile, q=q, axis=axis, out=out, **kwargs
|
@ -1,3 +1,35 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 13 16:19:31 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 5.2.1
|
||||
## Bug Fixes
|
||||
### astropy.coordinates
|
||||
* Fix to ITRS frame earth_location attribute to give the correct
|
||||
result for a topocentric frame. [#14180]
|
||||
### astropy.cosmology
|
||||
* Bounds are no longer passed to the scipy minimizer for methods
|
||||
Brent and Golden. The scipy minimizer never used the bounds but
|
||||
silently accepted them. In scipy v1.11.0.dev0+ an error is
|
||||
raised, so we now pass None as the bounds to the minimizer.
|
||||
Users should not be affected by this change. [#14232]
|
||||
### astropy.io.fits
|
||||
* Tables with multidimensional variable length array can now be
|
||||
properly read and written. [#13417]
|
||||
### astropy.units
|
||||
* Modified the behavior of numpy.histogram(),
|
||||
numpy.histogram_bin_edges(), numpy.histogram2d(), and
|
||||
numpy.histogramdd() so that the range argument must a
|
||||
compatible instance of astropy.units.Quantity if the other
|
||||
arguments are instances of astropy.units.Quantity. [#14213]
|
||||
### astropy.visualization
|
||||
* Improved the performance of drawing WCSAxes grids by skipping
|
||||
some unnecessary computations. [#14164]
|
||||
* Fixed WCSAxes sometimes triggering a NumPy RuntimeWarning when
|
||||
determining the coordinate range of the axes. [#14211]
|
||||
## Other Changes and Additions
|
||||
* Fix compatibility with Numpy 1.24. [#14193]
|
||||
- Drop astropy-pr14194-numpy1.24.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 21 22:56:59 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -54,7 +54,7 @@
|
||||
%{?unbundle_wcs}
|
||||
|
||||
Name: python-astropy%{psuffix}
|
||||
Version: 5.2
|
||||
Version: 5.2.1
|
||||
Release: 0
|
||||
Summary: Community-developed python astronomy tools
|
||||
License: BSD-3-Clause
|
||||
@ -64,8 +64,6 @@ Source: https://files.pythonhosted.org/packages/source/a/astropy/astropy
|
||||
# Mark wcs headers as false positives for devel-file-in-non-devel-package
|
||||
# These are used by the python files so they must be available.
|
||||
Source100: python-astropy-rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: https://github.com/astropy/astropy/pull/14194.patch#/astropy-pr14194-numpy1.24.patch
|
||||
# https://docs.astropy.org/en/v5.2/install.html#requirements
|
||||
BuildRequires: %{python_module Cython >= 0.29.30}
|
||||
BuildRequires: %{python_module Jinja2}
|
||||
|
Loading…
Reference in New Issue
Block a user