Release 2.12 that stops using new NumPy flip()

This commit is contained in:
Brandon Rhodes 2019-12-13 16:05:11 -05:00
parent b1a7bf313b
commit 8927698a85
4 changed files with 12 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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',