From 8927698a8502222d822c0b9c8c783fabe9629b74 Mon Sep 17 00:00:00 2001 From: Brandon Rhodes Date: Fri, 13 Dec 2019 16:05:11 -0500 Subject: [PATCH] Release 2.12 that stops using new NumPy flip() --- jplephem/__init__.py | 6 ++++++ jplephem/pck.py | 4 ++-- jplephem/spk.py | 6 +++--- setup.py | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/jplephem/__init__.py b/jplephem/__init__.py index 0e2e6a1..4814244 100644 --- a/jplephem/__init__.py +++ b/jplephem/__init__.py @@ -351,6 +351,12 @@ https://github.com/brandon-rhodes/python-jplephem/ Changelog --------- +**2019 December 13 — Version 2.12** + +* Replaced use of NumPy ``flip()`` with a reverse slice ``[::-1]`` after + discovering the function was a recent addition that some user installs + of NumPy do not support. + **2019 December 13 — Version 2.11** * Reverse the order in which Chebyshev polynomials are computed to diff --git a/jplephem/pck.py b/jplephem/pck.py index e1d5894..cad5ded 100644 --- a/jplephem/pck.py +++ b/jplephem/pck.py @@ -3,7 +3,7 @@ ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/pck.html """ -from numpy import array, empty, empty_like, flip, rollaxis +from numpy import array, empty, empty_like, rollaxis from .daf import DAF from .names import target_names @@ -112,7 +112,7 @@ class Segment(object): coefficients.shape = (int(n), component_count, coefficient_count) coefficients = rollaxis(coefficients, 1) coefficients = rollaxis(coefficients, 2) - coefficients = flip(coefficients, 0) + coefficients = coefficients[::-1] return init, intlen, coefficients diff --git a/jplephem/spk.py b/jplephem/spk.py index f3ca73b..4a635a3 100644 --- a/jplephem/spk.py +++ b/jplephem/spk.py @@ -3,7 +3,7 @@ http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/FORTRAN/req/spk.html """ -from numpy import array, empty, empty_like, flip, interp, rollaxis +from numpy import array, empty, empty_like, interp, rollaxis from .daf import DAF from .descriptorlib import reify from .names import target_names @@ -182,7 +182,7 @@ class Segment(BaseSegment): coefficients.shape = (int(n), component_count, coefficient_count) coefficients = rollaxis(coefficients, 1) coefficients = rollaxis(coefficients, 2) - coefficients = flip(coefficients, 0) + coefficients = coefficients[::-1] return init, intlen, coefficients def load_array(self): @@ -193,7 +193,7 @@ class Segment(BaseSegment): init, intlen, coefficients = data initial_epoch = jd(init) interval_length = intlen / S_PER_DAY - coefficients = flip(coefficients, 0) + coefficients = coefficients[::-1] coefficients = rollaxis(coefficients, 2) coefficients = rollaxis(coefficients, 2) return initial_epoch, interval_length, coefficients diff --git a/setup.py b/setup.py index d67ceeb..f4b57a9 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ import jplephem description, long_description = jplephem.__doc__.split('\n', 1) setup(name = 'jplephem', - version = '2.11', + version = '2.12', description = description, long_description = long_description, license = 'MIT',