[Debian-astro-commits] [python-astropy] 01/04: New upstream version 1.3.2
Ole Streicher
olebole at moszumanska.debian.org
Fri Mar 31 12:42:16 UTC 2017
This is an automated email from the git hooks/post-receive script.
olebole pushed a commit to branch master
in repository python-astropy.
commit 39359cc9e56f657c61020279300a8c5d2329709a
Author: Ole Streicher <olebole at debian.org>
Date: Fri Mar 31 14:20:21 2017 +0200
New upstream version 1.3.2
---
CHANGES.rst | 36 +-
PKG-INFO | 2 +-
astropy/coordinates/representation.py | 17 +-
astropy/coordinates/sky_coordinate.py | 7 +-
astropy/coordinates/tests/test_regression.py | 26 +
astropy/coordinates/tests/test_representation.py | 30 +
astropy/modeling/src/projections.c | 672 ++++++++++-----------
astropy/units/quantity_helper.py | 22 +-
astropy/units/tests/test_quantity_ufuncs.py | 16 +
astropy/utils/xml/src/iterparse.c | 57 +-
astropy/utils/xml/tests/__init__.py | 0
astropy/utils/xml/tests/test_iterparse.py | 134 ++++
astropy/version.py | 10 +-
docs/development/codeguide.rst | 20 +-
docs/development/workflow/development_workflow.rst | 80 ++-
docs/install.rst | 4 +-
docs/known_issues.rst | 13 -
setup.py | 2 +-
18 files changed, 735 insertions(+), 413 deletions(-)
diff --git a/CHANGES.rst b/CHANGES.rst
index 8734386..506fadd 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,36 @@
+1.3.2 (2017-03-30)
+------------------
+
+Bug Fixes
+^^^^^^^^^
+
+- ``astropy.coordinates``
+
+ - Ensure that checking equivalance of ``SkyCoord`` objects works with
+ non-scalar attributes [#5884, #5887]
+
+ - Ensure that transformation to frames with multi-dimensional attributes
+ works as expected [#5890, #5897]
+
+ - Make sure all ``BaseRepresentation`` objects can be output as strings.
+ [#5889, #5897]
+
+- ``astropy.units``
+
+ - Add support for ``heaviside`` ufunc (new in numpy 1.13). [#5920]
+
+- ``astropy.utils``
+
+ - Fix to allow the C-based _fast_iterparse() VOTable XML parser to
+ relloc() its buffers instead of overflowing them. [#5824, #5869]
+
+
+Other Changes and Additions
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- File permissions are revised in the released source distribution. [#5912]
+
+
1.3.1 (2017-03-18)
------------------
@@ -227,8 +260,7 @@ New Features
- Install both runtime and test dependencies when running the
./setup.py test command. These dependencies are specified by the
- install_requires and tests_require keywords via setuptools.
- [#5092, astropy-helpers #212]
+ install_requires and tests_require keywords via setuptools. [#5092]
- Enable easier subclassing of the TestRunner class. [#5505]
diff --git a/PKG-INFO b/PKG-INFO
index cd4d569..40e6d9b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: astropy
-Version: 1.3.1
+Version: 1.3.2
Summary: Community-developed python astronomy tools
Home-page: http://astropy.org
Author: The Astropy Developers
diff --git a/astropy/coordinates/representation.py b/astropy/coordinates/representation.py
index bd818f8..e019f1a 100644
--- a/astropy/coordinates/representation.py
+++ b/astropy/coordinates/representation.py
@@ -216,17 +216,12 @@ class BaseRepresentation(ShapedLikeNDArray):
The record array fields will have the component names.
"""
- coordinates = [getattr(self, c) for c in self.components]
- if NUMPY_LT_1_8:
- # numpy 1.7 has problems concatenating broadcasted arrays.
- coordinates = [(coo.copy() if 0 in coo.strides else coo)
- for coo in coordinates]
-
- sh = self.shape + (1,)
- dtype = np.dtype([(str(c), coo.dtype)
- for c, coo in zip(self.components, coordinates)])
- return np.concatenate([coo.reshape(sh).value for coo in coordinates],
- axis=-1).view(dtype).squeeze()
+ # The "str(c)" is needed for PY2; it can be removed for astropy 3.0.
+ coo_items = [(str(c), getattr(self, c)) for c in self.components]
+ result = np.empty(self.shape, [(c, coo.dtype) for c, coo in coo_items])
+ for c, coo in coo_items:
+ result[c] = coo.value
+ return result
@property
def _units(self):
diff --git a/astropy/coordinates/sky_coordinate.py b/astropy/coordinates/sky_coordinate.py
index dce7e2b..1a96b13 100644
--- a/astropy/coordinates/sky_coordinate.py
+++ b/astropy/coordinates/sky_coordinate.py
@@ -449,8 +449,9 @@ class SkyCoord(ShapedLikeNDArray):
# Finally make the new SkyCoord object from the `new_coord` and
# remaining frame_kwargs that are not frame_attributes in `new_coord`.
- # We could remove overlaps here, but the init code is set up to accept
- # overlaps as long as the values are identical (which they must be).
+ for attr in (set(new_coord.get_frame_attr_names()) &
+ set(frame_kwargs.keys())):
+ frame_kwargs.pop(attr)
return self.__class__(new_coord, **frame_kwargs)
def __getattr__(self, attr):
@@ -650,7 +651,7 @@ class SkyCoord(ShapedLikeNDArray):
return False
for fattrnm in FRAME_ATTR_NAMES_SET():
- if getattr(self, fattrnm) != getattr(other, fattrnm):
+ if np.any(getattr(self, fattrnm) != getattr(other, fattrnm)):
return False
return True
else:
diff --git a/astropy/coordinates/tests/test_regression.py b/astropy/coordinates/tests/test_regression.py
index 2e1f22d..7da3613 100644
--- a/astropy/coordinates/tests/test_regression.py
+++ b/astropy/coordinates/tests/test_regression.py
@@ -348,3 +348,29 @@ def test_regression_simple_5133():
# az is more-or-less undefined for straight up or down
assert_quantity_allclose(aa.alt, [90, -90]*u.deg, rtol=1e-5)
assert_quantity_allclose(aa.distance, [90, 10]*u.km)
+
+
+def test_regression_5884():
+ # ensure comparison of frames with non-scalar attributes works
+ times = Time(["2015-08-28 03:30", "2015-08-28 12:00", "2015-09-05 10:30", "2015-09-15 18:35"])
+ coo1 = SkyCoord(40*u.deg, 50*u.deg, obstime=times)
+ coo2 = SkyCoord(41*u.deg, 52*u.deg, obstime=times)
+ # check this does not raise a ValueError
+ coo1.is_equivalent_frame(coo2)
+ # let's do N-D whilst we're at it
+ times = times.reshape((2,2))
+ coo1 = SkyCoord(40*u.deg, 50*u.deg, obstime=times)
+ coo2 = SkyCoord(41*u.deg, 52*u.deg, obstime=times)
+ coo1.is_equivalent_frame(coo2)
+
+
+def test_regression_5889_5890():
+ # ensure we can represent all Representations and transform to ND frames
+ greenwich = EarthLocation(
+ *u.Quantity([3980608.90246817, -102.47522911, 4966861.27310067],
+ unit=u.m))
+ times = Time("2017-03-20T12:00:00") + np.linspace(-2,2,3)*u.hour
+ moon = get_moon(times, location=greenwich)
+ targets = SkyCoord([350.7*u.deg, 260.7*u.deg], [18.4*u.deg, 22.4*u.deg])
+ targs2d = targets[:, np.newaxis]
+ targs2d.transform_to(moon)
diff --git a/astropy/coordinates/tests/test_representation.py b/astropy/coordinates/tests/test_representation.py
index f56f3a9..647018f 100644
--- a/astropy/coordinates/tests/test_representation.py
+++ b/astropy/coordinates/tests/test_representation.py
@@ -976,6 +976,22 @@ def test_representation_repr():
' [( 1., 4., 9.), ( 2., 4., 10.), ( 3., 4., 11.)]>')
+def test_representation_repr_multi_d():
+ """Regression test for #5889."""
+ cr = CartesianRepresentation(np.arange(27).reshape(3,3,3), unit='m')
+ assert repr(cr) == (
+ '<CartesianRepresentation (x, y, z) in m\n'
+ ' [[( 0., 9., 18.), ( 1., 10., 19.), ( 2., 11., 20.)],\n'
+ ' [( 3., 12., 21.), ( 4., 13., 22.), ( 5., 14., 23.)],\n'
+ ' [( 6., 15., 24.), ( 7., 16., 25.), ( 8., 17., 26.)]]>')
+ # This was broken before.
+ assert repr(cr.T) == (
+ '<CartesianRepresentation (x, y, z) in m\n'
+ ' [[( 0., 9., 18.), ( 3., 12., 21.), ( 6., 15., 24.)],\n'
+ ' [( 1., 10., 19.), ( 4., 13., 22.), ( 7., 16., 25.)],\n'
+ ' [( 2., 11., 20.), ( 5., 14., 23.), ( 8., 17., 26.)]]>')
+
+
def test_representation_str():
r1 = SphericalRepresentation(lon=1 * u.deg, lat=2.5 * u.deg, distance=1 * u.kpc)
assert str(r1) == '( 1., 2.5, 1.) (deg, deg, kpc)'
@@ -987,6 +1003,20 @@ def test_representation_str():
assert str(r3) == '[( 1., 4., 9.), ( 2., 4., 10.), ( 3., 4., 11.)] kpc'
+def test_representation_str_multi_d():
+ """Regression test for #5889."""
+ cr = CartesianRepresentation(np.arange(27).reshape(3,3,3), unit='m')
+ assert str(cr) == (
+ '[[( 0., 9., 18.), ( 1., 10., 19.), ( 2., 11., 20.)],\n'
+ ' [( 3., 12., 21.), ( 4., 13., 22.), ( 5., 14., 23.)],\n'
+ ' [( 6., 15., 24.), ( 7., 16., 25.), ( 8., 17., 26.)]] m')
+ # This was broken before.
+ assert str(cr.T) == (
+ '[[( 0., 9., 18.), ( 3., 12., 21.), ( 6., 15., 24.)],\n'
+ ' [( 1., 10., 19.), ( 4., 13., 22.), ( 7., 16., 25.)],\n'
+ ' [( 2., 11., 20.), ( 5., 14., 23.), ( 8., 17., 26.)]] m')
+
+
def test_subclass_representation():
from collections import OrderedDict
from ..builtin_frames import ICRS
diff --git a/astropy/modeling/src/projections.c b/astropy/modeling/src/projections.c
index d9a93c4..003aab6 100644
--- a/astropy/modeling/src/projections.c
+++ b/astropy/modeling/src/projections.c
@@ -141,7 +141,7 @@ static PyObject *do_work(struct prjprm *prj, PyObject *in[2],
static PyObject*
-Py_azpx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_sflx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -151,28 +151,20 @@ Py_azpx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d"
- ":azpx2s",
- &in[0], &in[1]
-
- ,
- &prj.pv[0 + 1]
- ,
-
-
- &prj.pv[1 + 1]
+ ":sflx2s",
+ &in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, azpset, azpx2s);
+ return do_work(&prj, in, sflset, sflx2s);
}
static PyObject*
-Py_azps2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_sfls2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -182,23 +174,63 @@ Py_azps2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d"
- ":azps2x",
+
+ ":sfls2x",
&in[0], &in[1]
- ,
- &prj.pv[0 + 1]
- ,
+ )) {
+ return NULL;
+ }
+
+ return do_work(&prj, in, sflset, sfls2x);
+}
+
+
+
+
+static PyObject*
+Py_aitx2s(PyObject* __, PyObject* args, PyObject* kwds)
+{
+ PyObject* in[2] = { NULL, NULL };
+
+ struct prjprm prj;
+
+ memset(&prj, 0, sizeof(struct prjprm));
+
+ if (!PyArg_ParseTuple(args,
+ "OO"
+ ":aitx2s",
+ &in[0], &in[1]
- &prj.pv[1 + 1]
+ )) {
+ return NULL;
+ }
+
+ return do_work(&prj, in, aitset, aitx2s);
+}
+
+
+static PyObject*
+Py_aits2x(PyObject* __, PyObject* args, PyObject* kwds)
+{
+ PyObject* in[2] = { NULL, NULL };
+
+ struct prjprm prj;
+
+ memset(&prj, 0, sizeof(struct prjprm));
+
+ if (!PyArg_ParseTuple(args,
+ "OO"
+ ":aits2x",
+ &in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, azpset, azps2x);
+ return do_work(&prj, in, aitset, aits2x);
}
@@ -253,7 +285,7 @@ Py_stgs2x(PyObject* __, PyObject* args, PyObject* kwds)
static PyObject*
-Py_sinx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_molx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -263,8 +295,56 @@ Py_sinx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d"
- ":sinx2s",
+
+ ":molx2s",
+ &in[0], &in[1]
+
+ )) {
+ return NULL;
+ }
+
+ return do_work(&prj, in, molset, molx2s);
+}
+
+
+static PyObject*
+Py_mols2x(PyObject* __, PyObject* args, PyObject* kwds)
+{
+ PyObject* in[2] = { NULL, NULL };
+
+ struct prjprm prj;
+
+ memset(&prj, 0, sizeof(struct prjprm));
+
+ if (!PyArg_ParseTuple(args,
+ "OO"
+
+ ":mols2x",
+ &in[0], &in[1]
+
+ )) {
+ return NULL;
+ }
+
+ return do_work(&prj, in, molset, mols2x);
+}
+
+
+
+
+static PyObject*
+Py_szpx2s(PyObject* __, PyObject* args, PyObject* kwds)
+{
+ PyObject* in[2] = { NULL, NULL };
+
+ struct prjprm prj;
+
+ memset(&prj, 0, sizeof(struct prjprm));
+
+ if (!PyArg_ParseTuple(args,
+ "OO"
+ "d" "d" "d"
+ ":szpx2s",
&in[0], &in[1]
,
@@ -273,18 +353,22 @@ Py_sinx2s(PyObject* __, PyObject* args, PyObject* kwds)
&prj.pv[1 + 1]
+ ,
+
+
+ &prj.pv[2 + 1]
)) {
return NULL;
}
- return do_work(&prj, in, sinset, sinx2s);
+ return do_work(&prj, in, szpset, szpx2s);
}
static PyObject*
-Py_sins2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_szps2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -294,8 +378,8 @@ Py_sins2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d"
- ":sins2x",
+ "d" "d" "d"
+ ":szps2x",
&in[0], &in[1]
,
@@ -304,20 +388,24 @@ Py_sins2x(PyObject* __, PyObject* args, PyObject* kwds)
&prj.pv[1 + 1]
+ ,
+
+
+ &prj.pv[2 + 1]
)) {
return NULL;
}
- return do_work(&prj, in, sinset, sins2x);
+ return do_work(&prj, in, szpset, szps2x);
}
static PyObject*
-Py_aitx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_parx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -328,19 +416,19 @@ Py_aitx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":aitx2s",
+ ":parx2s",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, aitset, aitx2s);
+ return do_work(&prj, in, parset, parx2s);
}
static PyObject*
-Py_aits2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_pars2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -351,21 +439,21 @@ Py_aits2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":aits2x",
+ ":pars2x",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, aitset, aits2x);
+ return do_work(&prj, in, parset, pars2x);
}
static PyObject*
-Py_airx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_ceax2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -376,7 +464,7 @@ Py_airx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
"d"
- ":airx2s",
+ ":ceax2s",
&in[0], &in[1]
,
@@ -387,12 +475,12 @@ Py_airx2s(PyObject* __, PyObject* args, PyObject* kwds)
return NULL;
}
- return do_work(&prj, in, airset, airx2s);
+ return do_work(&prj, in, ceaset, ceax2s);
}
static PyObject*
-Py_airs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_ceas2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -403,7 +491,7 @@ Py_airs2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
"d"
- ":airs2x",
+ ":ceas2x",
&in[0], &in[1]
,
@@ -414,14 +502,14 @@ Py_airs2x(PyObject* __, PyObject* args, PyObject* kwds)
return NULL;
}
- return do_work(&prj, in, airset, airs2x);
+ return do_work(&prj, in, ceaset, ceas2x);
}
static PyObject*
-Py_hpxx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cscx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -431,28 +519,20 @@ Py_hpxx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d"
- ":hpxx2s",
- &in[0], &in[1]
-
- ,
- &prj.pv[0 + 1]
- ,
-
-
- &prj.pv[1 + 1]
+ ":cscx2s",
+ &in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, hpxset, hpxx2s);
+ return do_work(&prj, in, cscset, cscx2s);
}
static PyObject*
-Py_hpxs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cscs2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -462,23 +542,15 @@ Py_hpxs2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d"
- ":hpxs2x",
- &in[0], &in[1]
-
- ,
- &prj.pv[0 + 1]
- ,
-
-
- &prj.pv[1 + 1]
+ ":cscs2x",
+ &in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, hpxset, hpxs2x);
+ return do_work(&prj, in, cscset, cscs2x);
}
@@ -549,7 +621,7 @@ Py_cops2x(PyObject* __, PyObject* args, PyObject* kwds)
static PyObject*
-Py_cscx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_sinx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -559,20 +631,28 @@ Py_cscx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
-
- ":cscx2s",
+ "d" "d"
+ ":sinx2s",
&in[0], &in[1]
+ ,
+ &prj.pv[0 + 1]
+ ,
+
+
+ &prj.pv[1 + 1]
+
+
)) {
return NULL;
}
- return do_work(&prj, in, cscset, cscx2s);
+ return do_work(&prj, in, sinset, sinx2s);
}
static PyObject*
-Py_cscs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_sins2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -582,22 +662,30 @@ Py_cscs2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
-
- ":cscs2x",
+ "d" "d"
+ ":sins2x",
&in[0], &in[1]
+ ,
+ &prj.pv[0 + 1]
+ ,
+
+
+ &prj.pv[1 + 1]
+
+
)) {
return NULL;
}
- return do_work(&prj, in, cscset, cscs2x);
+ return do_work(&prj, in, sinset, sins2x);
}
static PyObject*
-Py_tanx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_arcx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -608,19 +696,19 @@ Py_tanx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":tanx2s",
+ ":arcx2s",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, tanset, tanx2s);
+ return do_work(&prj, in, arcset, arcx2s);
}
static PyObject*
-Py_tans2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_arcs2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -631,21 +719,21 @@ Py_tans2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":tans2x",
+ ":arcs2x",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, tanset, tans2x);
+ return do_work(&prj, in, arcset, arcs2x);
}
static PyObject*
-Py_merx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_azpx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -655,20 +743,28 @@ Py_merx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
-
- ":merx2s",
+ "d" "d"
+ ":azpx2s",
&in[0], &in[1]
+ ,
+ &prj.pv[0 + 1]
+ ,
+
+
+ &prj.pv[1 + 1]
+
+
)) {
return NULL;
}
- return do_work(&prj, in, merset, merx2s);
+ return do_work(&prj, in, azpset, azpx2s);
}
static PyObject*
-Py_mers2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_azps2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -678,22 +774,30 @@ Py_mers2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
-
- ":mers2x",
+ "d" "d"
+ ":azps2x",
&in[0], &in[1]
+ ,
+ &prj.pv[0 + 1]
+ ,
+
+
+ &prj.pv[1 + 1]
+
+
)) {
return NULL;
}
- return do_work(&prj, in, merset, mers2x);
+ return do_work(&prj, in, azpset, azps2x);
}
static PyObject*
-Py_arcx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_xphx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -704,19 +808,19 @@ Py_arcx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":arcx2s",
+ ":xphx2s",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, arcset, arcx2s);
+ return do_work(&prj, in, xphset, xphx2s);
}
static PyObject*
-Py_arcs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_xphs2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -727,21 +831,21 @@ Py_arcs2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":arcs2x",
+ ":xphs2x",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, arcset, arcs2x);
+ return do_work(&prj, in, xphset, xphs2x);
}
static PyObject*
-Py_ceax2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_airx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -752,7 +856,7 @@ Py_ceax2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
"d"
- ":ceax2s",
+ ":airx2s",
&in[0], &in[1]
,
@@ -763,12 +867,12 @@ Py_ceax2s(PyObject* __, PyObject* args, PyObject* kwds)
return NULL;
}
- return do_work(&prj, in, ceaset, ceax2s);
+ return do_work(&prj, in, airset, airx2s);
}
static PyObject*
-Py_ceas2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_airs2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -779,7 +883,7 @@ Py_ceas2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
"d"
- ":ceas2x",
+ ":airs2x",
&in[0], &in[1]
,
@@ -790,14 +894,14 @@ Py_ceas2x(PyObject* __, PyObject* args, PyObject* kwds)
return NULL;
}
- return do_work(&prj, in, ceaset, ceas2x);
+ return do_work(&prj, in, airset, airs2x);
}
static PyObject*
-Py_szpx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_hpxx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -807,8 +911,8 @@ Py_szpx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d" "d"
- ":szpx2s",
+ "d" "d"
+ ":hpxx2s",
&in[0], &in[1]
,
@@ -817,22 +921,18 @@ Py_szpx2s(PyObject* __, PyObject* args, PyObject* kwds)
&prj.pv[1 + 1]
- ,
-
-
- &prj.pv[2 + 1]
)) {
return NULL;
}
- return do_work(&prj, in, szpset, szpx2s);
+ return do_work(&prj, in, hpxset, hpxx2s);
}
static PyObject*
-Py_szps2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_hpxs2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -842,8 +942,8 @@ Py_szps2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d" "d"
- ":szps2x",
+ "d" "d"
+ ":hpxs2x",
&in[0], &in[1]
,
@@ -852,24 +952,20 @@ Py_szps2x(PyObject* __, PyObject* args, PyObject* kwds)
&prj.pv[1 + 1]
- ,
-
-
- &prj.pv[2 + 1]
)) {
return NULL;
}
- return do_work(&prj, in, szpset, szps2x);
+ return do_work(&prj, in, hpxset, hpxs2x);
}
static PyObject*
-Py_zeax2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_merx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -880,19 +976,19 @@ Py_zeax2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":zeax2s",
+ ":merx2s",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, zeaset, zeax2s);
+ return do_work(&prj, in, merset, merx2s);
}
static PyObject*
-Py_zeas2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_mers2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -903,21 +999,21 @@ Py_zeas2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":zeas2x",
+ ":mers2x",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, zeaset, zeas2x);
+ return do_work(&prj, in, merset, mers2x);
}
static PyObject*
-Py_molx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cypx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -927,68 +1023,28 @@ Py_molx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
-
- ":molx2s",
+ "d" "d"
+ ":cypx2s",
&in[0], &in[1]
- )) {
- return NULL;
- }
-
- return do_work(&prj, in, molset, molx2s);
-}
-
-
-static PyObject*
-Py_mols2x(PyObject* __, PyObject* args, PyObject* kwds)
-{
- PyObject* in[2] = { NULL, NULL };
-
- struct prjprm prj;
-
- memset(&prj, 0, sizeof(struct prjprm));
-
- if (!PyArg_ParseTuple(args,
- "OO"
+ ,
+ &prj.pv[0 + 1]
+ ,
- ":mols2x",
- &in[0], &in[1]
- )) {
- return NULL;
- }
-
- return do_work(&prj, in, molset, mols2x);
-}
-
-
-
-
-static PyObject*
-Py_parx2s(PyObject* __, PyObject* args, PyObject* kwds)
-{
- PyObject* in[2] = { NULL, NULL };
-
- struct prjprm prj;
-
- memset(&prj, 0, sizeof(struct prjprm));
-
- if (!PyArg_ParseTuple(args,
- "OO"
+ &prj.pv[1 + 1]
- ":parx2s",
- &in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, parset, parx2s);
+ return do_work(&prj, in, cypset, cypx2s);
}
static PyObject*
-Py_pars2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cyps2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -998,22 +1054,30 @@ Py_pars2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
-
- ":pars2x",
+ "d" "d"
+ ":cyps2x",
&in[0], &in[1]
+ ,
+ &prj.pv[0 + 1]
+ ,
+
+
+ &prj.pv[1 + 1]
+
+
)) {
return NULL;
}
- return do_work(&prj, in, parset, pars2x);
+ return do_work(&prj, in, cypset, cyps2x);
}
static PyObject*
-Py_codx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_coox2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1024,7 +1088,7 @@ Py_codx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
"d" "d"
- ":codx2s",
+ ":coox2s",
&in[0], &in[1]
,
@@ -1039,12 +1103,12 @@ Py_codx2s(PyObject* __, PyObject* args, PyObject* kwds)
return NULL;
}
- return do_work(&prj, in, codset, codx2s);
+ return do_work(&prj, in, cooset, coox2s);
}
static PyObject*
-Py_cods2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_coos2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1055,7 +1119,7 @@ Py_cods2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
"d" "d"
- ":cods2x",
+ ":coos2x",
&in[0], &in[1]
,
@@ -1070,14 +1134,14 @@ Py_cods2x(PyObject* __, PyObject* args, PyObject* kwds)
return NULL;
}
- return do_work(&prj, in, codset, cods2x);
+ return do_work(&prj, in, cooset, coos2x);
}
static PyObject*
-Py_coox2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_pcox2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1087,28 +1151,20 @@ Py_coox2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d"
- ":coox2s",
- &in[0], &in[1]
-
- ,
- &prj.pv[0 + 1]
- ,
-
-
- &prj.pv[1 + 1]
+ ":pcox2s",
+ &in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, cooset, coox2s);
+ return do_work(&prj, in, pcoset, pcox2s);
}
static PyObject*
-Py_coos2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_pcos2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1118,30 +1174,22 @@ Py_coos2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- "d" "d"
- ":coos2x",
- &in[0], &in[1]
-
- ,
- &prj.pv[0 + 1]
- ,
-
-
- &prj.pv[1 + 1]
+ ":pcos2x",
+ &in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, cooset, coos2x);
+ return do_work(&prj, in, pcoset, pcos2x);
}
static PyObject*
-Py_xphx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_codx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1151,20 +1199,28 @@ Py_xphx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
-
- ":xphx2s",
+ "d" "d"
+ ":codx2s",
&in[0], &in[1]
+ ,
+ &prj.pv[0 + 1]
+ ,
+
+
+ &prj.pv[1 + 1]
+
+
)) {
return NULL;
}
- return do_work(&prj, in, xphset, xphx2s);
+ return do_work(&prj, in, codset, codx2s);
}
static PyObject*
-Py_xphs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cods2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1174,22 +1230,30 @@ Py_xphs2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
-
- ":xphs2x",
+ "d" "d"
+ ":cods2x",
&in[0], &in[1]
+ ,
+ &prj.pv[0 + 1]
+ ,
+
+
+ &prj.pv[1 + 1]
+
+
)) {
return NULL;
}
- return do_work(&prj, in, xphset, xphs2x);
+ return do_work(&prj, in, codset, cods2x);
}
static PyObject*
-Py_qscx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_tanx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1200,19 +1264,19 @@ Py_qscx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":qscx2s",
+ ":tanx2s",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, qscset, qscx2s);
+ return do_work(&prj, in, tanset, tanx2s);
}
static PyObject*
-Py_qscs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_tans2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1223,14 +1287,14 @@ Py_qscs2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":qscs2x",
+ ":tans2x",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, qscset, qscs2x);
+ return do_work(&prj, in, tanset, tans2x);
}
@@ -1301,7 +1365,7 @@ Py_coes2x(PyObject* __, PyObject* args, PyObject* kwds)
static PyObject*
-Py_sflx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_zeax2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1312,19 +1376,19 @@ Py_sflx2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":sflx2s",
+ ":zeax2s",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, sflset, sflx2s);
+ return do_work(&prj, in, zeaset, zeax2s);
}
static PyObject*
-Py_sfls2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_zeas2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1335,21 +1399,21 @@ Py_sfls2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":sfls2x",
+ ":zeas2x",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, sflset, sfls2x);
+ return do_work(&prj, in, zeaset, zeas2x);
}
static PyObject*
-Py_pcox2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_qscx2s(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1360,19 +1424,19 @@ Py_pcox2s(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":pcox2s",
+ ":qscx2s",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, pcoset, pcox2s);
+ return do_work(&prj, in, qscset, qscx2s);
}
static PyObject*
-Py_pcos2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_qscs2x(PyObject* __, PyObject* args, PyObject* kwds)
{
PyObject* in[2] = { NULL, NULL };
@@ -1383,14 +1447,14 @@ Py_pcos2x(PyObject* __, PyObject* args, PyObject* kwds)
if (!PyArg_ParseTuple(args,
"OO"
- ":pcos2x",
+ ":qscs2x",
&in[0], &in[1]
)) {
return NULL;
}
- return do_work(&prj, in, pcoset, pcos2x);
+ return do_work(&prj, in, qscset, qscs2x);
}
@@ -1500,70 +1564,6 @@ Py_tscs2x(PyObject* __, PyObject* args, PyObject* kwds)
-static PyObject*
-Py_cypx2s(PyObject* __, PyObject* args, PyObject* kwds)
-{
- PyObject* in[2] = { NULL, NULL };
-
- struct prjprm prj;
-
- memset(&prj, 0, sizeof(struct prjprm));
-
- if (!PyArg_ParseTuple(args,
- "OO"
- "d" "d"
- ":cypx2s",
- &in[0], &in[1]
-
- ,
- &prj.pv[0 + 1]
- ,
-
-
- &prj.pv[1 + 1]
-
-
- )) {
- return NULL;
- }
-
- return do_work(&prj, in, cypset, cypx2s);
-}
-
-
-static PyObject*
-Py_cyps2x(PyObject* __, PyObject* args, PyObject* kwds)
-{
- PyObject* in[2] = { NULL, NULL };
-
- struct prjprm prj;
-
- memset(&prj, 0, sizeof(struct prjprm));
-
- if (!PyArg_ParseTuple(args,
- "OO"
- "d" "d"
- ":cyps2x",
- &in[0], &in[1]
-
- ,
- &prj.pv[0 + 1]
- ,
-
-
- &prj.pv[1 + 1]
-
-
- )) {
- return NULL;
- }
-
- return do_work(&prj, in, cypset, cyps2x);
-}
-
-
-
-
/***************************************************************************
* Module-level
@@ -1572,45 +1572,45 @@ Py_cyps2x(PyObject* __, PyObject* args, PyObject* kwds)
static PyMethodDef module_methods[] = {
- {"azpx2s", (PyCFunction)Py_azpx2s, METH_VARARGS, NULL},
+ {"sflx2s", (PyCFunction)Py_sflx2s, METH_VARARGS, NULL},
- {"azps2x", (PyCFunction)Py_azps2x, METH_VARARGS, NULL},
+ {"sfls2x", (PyCFunction)Py_sfls2x, METH_VARARGS, NULL},
- {"stgx2s", (PyCFunction)Py_stgx2s, METH_VARARGS, NULL},
+ {"aitx2s", (PyCFunction)Py_aitx2s, METH_VARARGS, NULL},
- {"stgs2x", (PyCFunction)Py_stgs2x, METH_VARARGS, NULL},
+ {"aits2x", (PyCFunction)Py_aits2x, METH_VARARGS, NULL},
- {"sinx2s", (PyCFunction)Py_sinx2s, METH_VARARGS, NULL},
+ {"stgx2s", (PyCFunction)Py_stgx2s, METH_VARARGS, NULL},
- {"sins2x", (PyCFunction)Py_sins2x, METH_VARARGS, NULL},
+ {"stgs2x", (PyCFunction)Py_stgs2x, METH_VARARGS, NULL},
- {"aitx2s", (PyCFunction)Py_aitx2s, METH_VARARGS, NULL},
+ {"molx2s", (PyCFunction)Py_molx2s, METH_VARARGS, NULL},
- {"aits2x", (PyCFunction)Py_aits2x, METH_VARARGS, NULL},
+ {"mols2x", (PyCFunction)Py_mols2x, METH_VARARGS, NULL},
- {"airx2s", (PyCFunction)Py_airx2s, METH_VARARGS, NULL},
+ {"szpx2s", (PyCFunction)Py_szpx2s, METH_VARARGS, NULL},
- {"airs2x", (PyCFunction)Py_airs2x, METH_VARARGS, NULL},
+ {"szps2x", (PyCFunction)Py_szps2x, METH_VARARGS, NULL},
- {"hpxx2s", (PyCFunction)Py_hpxx2s, METH_VARARGS, NULL},
+ {"parx2s", (PyCFunction)Py_parx2s, METH_VARARGS, NULL},
- {"hpxs2x", (PyCFunction)Py_hpxs2x, METH_VARARGS, NULL},
+ {"pars2x", (PyCFunction)Py_pars2x, METH_VARARGS, NULL},
- {"copx2s", (PyCFunction)Py_copx2s, METH_VARARGS, NULL},
+ {"ceax2s", (PyCFunction)Py_ceax2s, METH_VARARGS, NULL},
- {"cops2x", (PyCFunction)Py_cops2x, METH_VARARGS, NULL},
+ {"ceas2x", (PyCFunction)Py_ceas2x, METH_VARARGS, NULL},
@@ -1620,15 +1620,15 @@ static PyMethodDef module_methods[] = {
- {"tanx2s", (PyCFunction)Py_tanx2s, METH_VARARGS, NULL},
+ {"copx2s", (PyCFunction)Py_copx2s, METH_VARARGS, NULL},
- {"tans2x", (PyCFunction)Py_tans2x, METH_VARARGS, NULL},
+ {"cops2x", (PyCFunction)Py_cops2x, METH_VARARGS, NULL},
- {"merx2s", (PyCFunction)Py_merx2s, METH_VARARGS, NULL},
+ {"sinx2s", (PyCFunction)Py_sinx2s, METH_VARARGS, NULL},
- {"mers2x", (PyCFunction)Py_mers2x, METH_VARARGS, NULL},
+ {"sins2x", (PyCFunction)Py_sins2x, METH_VARARGS, NULL},
@@ -1638,39 +1638,39 @@ static PyMethodDef module_methods[] = {
- {"ceax2s", (PyCFunction)Py_ceax2s, METH_VARARGS, NULL},
+ {"azpx2s", (PyCFunction)Py_azpx2s, METH_VARARGS, NULL},
- {"ceas2x", (PyCFunction)Py_ceas2x, METH_VARARGS, NULL},
+ {"azps2x", (PyCFunction)Py_azps2x, METH_VARARGS, NULL},
- {"szpx2s", (PyCFunction)Py_szpx2s, METH_VARARGS, NULL},
+ {"xphx2s", (PyCFunction)Py_xphx2s, METH_VARARGS, NULL},
- {"szps2x", (PyCFunction)Py_szps2x, METH_VARARGS, NULL},
+ {"xphs2x", (PyCFunction)Py_xphs2x, METH_VARARGS, NULL},
- {"zeax2s", (PyCFunction)Py_zeax2s, METH_VARARGS, NULL},
+ {"airx2s", (PyCFunction)Py_airx2s, METH_VARARGS, NULL},
- {"zeas2x", (PyCFunction)Py_zeas2x, METH_VARARGS, NULL},
+ {"airs2x", (PyCFunction)Py_airs2x, METH_VARARGS, NULL},
- {"molx2s", (PyCFunction)Py_molx2s, METH_VARARGS, NULL},
+ {"hpxx2s", (PyCFunction)Py_hpxx2s, METH_VARARGS, NULL},
- {"mols2x", (PyCFunction)Py_mols2x, METH_VARARGS, NULL},
+ {"hpxs2x", (PyCFunction)Py_hpxs2x, METH_VARARGS, NULL},
- {"parx2s", (PyCFunction)Py_parx2s, METH_VARARGS, NULL},
+ {"merx2s", (PyCFunction)Py_merx2s, METH_VARARGS, NULL},
- {"pars2x", (PyCFunction)Py_pars2x, METH_VARARGS, NULL},
+ {"mers2x", (PyCFunction)Py_mers2x, METH_VARARGS, NULL},
- {"codx2s", (PyCFunction)Py_codx2s, METH_VARARGS, NULL},
+ {"cypx2s", (PyCFunction)Py_cypx2s, METH_VARARGS, NULL},
- {"cods2x", (PyCFunction)Py_cods2x, METH_VARARGS, NULL},
+ {"cyps2x", (PyCFunction)Py_cyps2x, METH_VARARGS, NULL},
@@ -1680,15 +1680,21 @@ static PyMethodDef module_methods[] = {
- {"xphx2s", (PyCFunction)Py_xphx2s, METH_VARARGS, NULL},
+ {"pcox2s", (PyCFunction)Py_pcox2s, METH_VARARGS, NULL},
- {"xphs2x", (PyCFunction)Py_xphs2x, METH_VARARGS, NULL},
+ {"pcos2x", (PyCFunction)Py_pcos2x, METH_VARARGS, NULL},
- {"qscx2s", (PyCFunction)Py_qscx2s, METH_VARARGS, NULL},
+ {"codx2s", (PyCFunction)Py_codx2s, METH_VARARGS, NULL},
- {"qscs2x", (PyCFunction)Py_qscs2x, METH_VARARGS, NULL},
+ {"cods2x", (PyCFunction)Py_cods2x, METH_VARARGS, NULL},
+
+
+
+ {"tanx2s", (PyCFunction)Py_tanx2s, METH_VARARGS, NULL},
+
+ {"tans2x", (PyCFunction)Py_tans2x, METH_VARARGS, NULL},
@@ -1698,15 +1704,15 @@ static PyMethodDef module_methods[] = {
- {"sflx2s", (PyCFunction)Py_sflx2s, METH_VARARGS, NULL},
+ {"zeax2s", (PyCFunction)Py_zeax2s, METH_VARARGS, NULL},
- {"sfls2x", (PyCFunction)Py_sfls2x, METH_VARARGS, NULL},
+ {"zeas2x", (PyCFunction)Py_zeas2x, METH_VARARGS, NULL},
- {"pcox2s", (PyCFunction)Py_pcox2s, METH_VARARGS, NULL},
+ {"qscx2s", (PyCFunction)Py_qscx2s, METH_VARARGS, NULL},
- {"pcos2x", (PyCFunction)Py_pcos2x, METH_VARARGS, NULL},
+ {"qscs2x", (PyCFunction)Py_qscs2x, METH_VARARGS, NULL},
@@ -1721,12 +1727,6 @@ static PyMethodDef module_methods[] = {
{"tscs2x", (PyCFunction)Py_tscs2x, METH_VARARGS, NULL},
-
- {"cypx2s", (PyCFunction)Py_cypx2s, METH_VARARGS, NULL},
-
- {"cyps2x", (PyCFunction)Py_cyps2x, METH_VARARGS, NULL},
-
-
{NULL} /* Sentinel */
};
diff --git a/astropy/units/quantity_helper.py b/astropy/units/quantity_helper.py
index 60b5e5f..d55230f 100644
--- a/astropy/units/quantity_helper.py
+++ b/astropy/units/quantity_helper.py
@@ -86,13 +86,8 @@ if isinstance(getattr(np, 'cbrt', None), np.ufunc):
UFUNC_HELPERS[np.cbrt] = lambda f, unit: (
[None], (unit ** Fraction(1, 3) if unit is not None
else dimensionless_unscaled))
-# ones_like was not private in numpy <= 1.6
-if isinstance(getattr(np.core.umath, 'ones_like', None), np.ufunc):
- UFUNC_HELPERS[np.core.umath.ones_like] = (lambda f, unit:
- ([None], dimensionless_unscaled))
-if isinstance(getattr(np.core.umath, '_ones_like', None), np.ufunc):
- UFUNC_HELPERS[np.core.umath._ones_like] = (lambda f, unit:
- ([None], dimensionless_unscaled))
+UFUNC_HELPERS[np.core.umath._ones_like] = (lambda f, unit:
+ ([None], dimensionless_unscaled))
# ufuncs that require dimensionless input and and give dimensionless output
def helper_dimensionless_to_dimensionless(f, unit):
@@ -241,6 +236,19 @@ def helper_copysign(f, unit1, unit2):
UFUNC_HELPERS[np.copysign] = helper_copysign
+# heaviside only was added in numpy 1.13
+if isinstance(getattr(np, 'heaviside', None), np.ufunc):
+ def helper_heaviside(f, unit1, unit2):
+ try:
+ converter2 = (get_converter(unit2, dimensionless_unscaled)
+ if unit2 is not None else None)
+ except UnitsError:
+ raise TypeError("Can only apply 'heaviside' function with a "
+ "dimensionless second argument.")
+ return ([None, converter2], dimensionless_unscaled)
+
+ UFUNC_HELPERS[np.heaviside] = helper_heaviside
+
def helper_two_arg_dimensionless(f, unit1, unit2):
try:
diff --git a/astropy/units/tests/test_quantity_ufuncs.py b/astropy/units/tests/test_quantity_ufuncs.py
index d270bf4..084fc41 100644
--- a/astropy/units/tests/test_quantity_ufuncs.py
+++ b/astropy/units/tests/test_quantity_ufuncs.py
@@ -273,6 +273,22 @@ class TestQuantityMathFuncs(object):
== np.array([1., 0.5, 0.25]) / u.m)
# cbrt only introduced in numpy 1.10
+ # heaviside only introduced in numpy 1.13
+ @pytest.mark.skipif("not hasattr(np, 'heaviside')")
+ def test_heaviside_scalar(self):
+ assert np.heaviside(0. * u.m, 0.5) == 0.5 * u.dimensionless_unscaled
+ assert np.heaviside(0. * u.s,
+ 25 * u.percent) == 0.25 * u.dimensionless_unscaled
+ assert np.heaviside(2. * u.J, 0.25) == 1. * u.dimensionless_unscaled
+
+ @pytest.mark.skipif("not hasattr(np, 'heaviside')")
+ def test_heaviside_array(self):
+ values = np.array([-1., 0., 0., +1.])
+ halfway = np.array([0.75, 0.25, 0.75, 0.25]) * u.dimensionless_unscaled
+ assert np.all(np.heaviside(values * u.m,
+ halfway * u.dimensionless_unscaled) ==
+ [0, 0.25, 0.75, +1.] * u.dimensionless_unscaled)
+
@pytest.mark.skipif("not hasattr(np, 'cbrt')")
def test_cbrt_scalar(self):
assert np.cbrt(8. * u.m**3) == 2. * u.m
diff --git a/astropy/utils/xml/src/iterparse.c b/astropy/utils/xml/src/iterparse.c
index 2158986..5c2dac4 100644
--- a/astropy/utils/xml/src/iterparse.c
+++ b/astropy/utils/xml/src/iterparse.c
@@ -122,6 +122,51 @@ typedef struct {
} IterParser;
/******************************************************************************
+ * Tuple queue
+ ******************************************************************************/
+
+/**
+ * Extend the tuple queue based on the new length of the textual XML input.
+ * This helps to cope with situations where the input is longer than
+ * requested (as occurs with transparent decompression of the input
+ * stream), and for the initial allocation to combine the logic in one place.
+ */
+static int
+queue_realloc(IterParser *self, Py_ssize_t req_size)
+{
+ PyObject** new_queue;
+ Py_ssize_t n = req_size / 2;
+
+ if (n <= self->queue_size)
+ return 0;
+
+ new_queue = realloc(self->queue, sizeof(PyObject*) * (size_t)n);
+
+ if (new_queue == NULL) {
+ PyErr_SetString(PyExc_MemoryError, "Out of memory for XML parsing queue.");
+ /*
+ * queue_realloc() is only called from IterParser_init() or
+ * IterParser_next() in situations where the queue is clear
+ * and empty. If this function were to be used in other
+ * situations it would be wise to iterate over the queue and
+ * clear/decrement the individual references, to save work for
+ * the garbage collector (in an out-of-memory situation).
+ */
+ goto fail;
+ }
+
+ self->queue = new_queue;
+ self->queue_size = n;
+ return 0;
+
+fail:
+ free(self->queue);
+ self->queue = NULL;
+ self->queue_size = 0;
+ return -1;
+}
+
+/******************************************************************************
* Text buffer
******************************************************************************/
@@ -673,6 +718,7 @@ IterParser_next(IterParser* self)
}
if (buflen < self->buffersize) {
+ /* EOF detection method only works for local regular files */
self->done = 1;
}
/* Handle a real C file descriptor or handle -- this is faster
@@ -684,12 +730,18 @@ IterParser_next(IterParser* self)
PyErr_SetFromErrno(PyExc_IOError);
goto fail;
} else if (buflen < self->buffersize) {
+ /* EOF detection method only works for local regular files */
self->done = 1;
}
buf = self->buffer;
}
+ if(queue_realloc(self, buflen)) {
+ Py_XDECREF(data);
+ goto fail;
+ }
+
/* Feed the read buffer to expat, which will call the event handlers */
if (XML_Parse(self->parser, buf, (int)buflen, self->done) == XML_STATUS_ERROR) {
/* One of the event handlers raised a Python error, make
@@ -998,10 +1050,7 @@ IterParser_init(IterParser *self, PyObject *args, PyObject *kwds)
goto fail;
}
- self->queue_size = buffersize / 2;
- self->queue = malloc(sizeof(PyObject*) * (size_t)self->queue_size);
- if (self->queue == NULL) {
- PyErr_SetString(PyExc_MemoryError, "Out of memory");
+ if (queue_realloc(self, buffersize)) {
goto fail;
}
diff --git a/astropy/utils/xml/tests/__init__.py b/astropy/utils/xml/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/astropy/utils/xml/tests/test_iterparse.py b/astropy/utils/xml/tests/test_iterparse.py
new file mode 100644
index 0000000..4b3973f
--- /dev/null
+++ b/astropy/utils/xml/tests/test_iterparse.py
@@ -0,0 +1,134 @@
+# Licensed under a 3-clause BSD style license - see LICENSE.rst
+from __future__ import (absolute_import, division, print_function,
+ unicode_literals)
+
+# LOCAL
+from ....utils.xml.iterparser import _fast_iterparse
+from ....extern import six
+
+# SYSTEM
+import zlib
+
+# The C-based XML parser for VOTables previously used fixed-sized
+# buffers (allocated at __init__() time). This test will
+# only pass with the patch that allows a dynamic realloc() of
+# the queue. This addresses the bugs:
+#
+# - "RuntimeError: XML queue overflow"
+# https://github.com/astropy/astropy/issues/5824
+# (Kudos to Stefan Becker---ARI/ZAH Heidelberg)
+#
+# - "iterparse.c: add queue_realloc() + move 'buffersize / 2' logic there"
+# https://github.com/astropy/astropy/issues/5869
+#
+# This test code can emulate a combination of network buffering and
+# gzip decompression---with different request sizes, it can be used to
+# demonstrate both under-reading and over-reading.
+#
+# Using the 512-tag VOTABLE XML sample input, and various combinations
+# of minimum/maximum fetch sizes, the following situations can be
+# generated:
+#
+# maximum_fetch = 1 (ValueError, no element found) still within gzip headers
+# maximum_fetch = 80 (ValueError, unclosed token) short read
+# maximum_fetch =217 passes, because decompressed_length > requested
+# && <512 tags in a single parse
+# maximum_fetch =218 (RuntimeError, XML queue overflow)
+#
+# The test provided here covers the over-reading identified in #5824
+# (equivalent to the 217).
+
+# Firstly, assemble a minimal VOTABLE header, table contents and footer.
+# This is done in textual form, as the aim is to only test the parser, not
+# the outputter!
+HEADER = """<?xml version="1.0" encoding="UTF-8"?>
+<VOTABLE>
+ <RESOURCE type="results">
+ <TABLE>
+ <FIELD ID="foo" name="foo" datatype="int" arraysize="1"/>
+ <DATA>
+ <TABLEDATA>
+"""
+
+ROW = """<TR><TD>0</TD></TR>
+"""
+
+FOOTER = """
+ </TABLEDATA>
+ </DATA>
+ </TABLE>
+ </RESOURCE>
+</VOTABLE>
+"""
+
+# minimum passable buffer size => 1024
+# 1024 / 2 => 512 tags for overflow
+# 512 - 7 tags in header, - 5 tags in footer = 500 tags required for overflow
+# 500 / 4 tags (<tr><td></td></tr>) per row == 125 rows required for overflow
+VOTABLE_XML = HEADER + 125*ROW + FOOTER
+
+# UngzipFileWrapper() wraps an existing file-like Object,
+# decompressing the content and returning the plaintext.
+# This therefore emulates the behaviour of the Python 'requests'
+# library when transparently decompressing Gzip HTTP responses.
+#
+# The critical behaviour is that---because of the
+# decompression---read() can return considerably more
+# bytes than were requested! (But, read() can also return less).
+#
+# inspiration:
+# http://stackoverflow.com/questions/4013843/how-to-wrap-file-object-read-and-write-operation-which-are-readonly
+
+
+class UngzipFileWrapper(object):
+ def __init__(self, fd, **kwargs):
+ self._file = fd
+ self._z = zlib.decompressobj(16 + zlib.MAX_WBITS)
+
+ def read(self, requested_length):
+ # emulate network buffering dynamics by clamping the read size
+ clamped_length = max(1, min(1 << 24, requested_length))
+ compressed = self._file.read(clamped_length)
+ plaintext = self._z.decompress(compressed)
+ # Only for real local files---just for the testcase
+ if len(compressed) == 0:
+ self.close()
+ return plaintext
+
+ def __getattr__(self, attr):
+ return getattr(self._file, attr)
+
+# test_iterparser_over_read_simple() is a very cut down test,
+# of the original more flexible test-case, but without external
+# dependencies. The plaintext is compressed and then decompressed
+# to provide a better emulation of the original situation where
+# the bug was observed.
+#
+# If a dependency upon 'zlib' is not desired, it would be possible to
+# simplify this testcase by replacing the compress/decompress with a
+# read() method emulation that always returned more from a buffer tha
+# was requested.
+
+
+def test_iterparser_over_read_simple():
+ # Take the plaintext of 512 tags, and compression it with a
+ # Gzip-style header (+16), to most closely emulate the behaviour
+ # of most HTTP servers.
+ zlib_GZIP_STYLE_HEADER = 16
+ compo = zlib.compressobj(zlib.Z_BEST_COMPRESSION,
+ zlib.DEFLATED,
+ zlib.MAX_WBITS + zlib_GZIP_STYLE_HEADER)
+
+ # Bytes vs. String .encode()/.decode() for compatibility with Python 3.5.
+ s = compo.compress(VOTABLE_XML.encode())
+ s = s + compo.flush()
+ fd = six.BytesIO(s)
+ fd.seek(0)
+
+ # Finally setup the test of the C-based '_fast_iterparse()' iterator
+ # and a situation in which it can be called a-la the VOTable Parser.
+ MINIMUM_REQUESTABLE_BUFFER_SIZE = 1024
+ uncompressed_fd = UngzipFileWrapper(fd)
+ iterable = _fast_iterparse(uncompressed_fd.read,
+ MINIMUM_REQUESTABLE_BUFFER_SIZE)
+ list(iterable)
diff --git a/astropy/version.py b/astropy/version.py
index 1d09072..e8af34d 100644
--- a/astropy/version.py
+++ b/astropy/version.py
@@ -1,17 +1,17 @@
-# Autogenerated by Astropy's setup.py on 2017-03-18 03:57:02.401641
+# Autogenerated by Astropy's setup.py on 2017-03-30 22:47:25.701378
from __future__ import unicode_literals
import datetime
-version = "1.3.1"
-githash = "a98d386f4d2715cdfd475385bc2824cd17173535"
+version = "1.3.2"
+githash = "698ea94934068163e79ee2d632152aabc72611f3"
major = 1
minor = 3
-bugfix = 1
+bugfix = 2
release = True
-timestamp = datetime.datetime(2017, 3, 18, 3, 57, 2, 401641)
+timestamp = datetime.datetime(2017, 3, 30, 22, 47, 25, 701378)
debug = False
try:
diff --git a/docs/development/codeguide.rst b/docs/development/codeguide.rst
index 9b0545c..d1c73ba 100644
--- a/docs/development/codeguide.rst
+++ b/docs/development/codeguide.rst
@@ -15,9 +15,9 @@ both for the core package and for affiliated packages.
Interface and Dependencies
--------------------------
-* All code must be compatible with Python 2.6, 2.7, as well as 3.3 and
+* All code must be compatible with Python 2.7, as well as 3.3 and
later. The use of `six`_ for writing code that is portable between Python
- 2.x and 3.x is encouraged going forward. However, much of our affiliate code
+ 2.x and 3.x is encouraged going forward. However, our affiliate code
may still use `2to3`_ to process Python 2.x files to be compatible with
Python 3.x.
@@ -46,16 +46,12 @@ Interface and Dependencies
:ref:`dev-portable`.
* The new Python 3 formatting style should be used (i.e.
- ``"{0:s}".format("spam")`` instead of ``"%s" % "spam"``), although
- when using positional arguments, the position should always be
- specified (i.e. ``"{:s}"`` is not compatible with Python
- 2.6).
+ ``"{0:s}".format("spam")`` instead of ``"%s" % "spam"``).
-* The core package and affiliated packages should be importable with
- no dependencies other than components already in the Astropy core,
- the `Python Standard Library
- <http://docs.python.org/release/2.6/library/index.html>`_, and
- NumPy_ |minimum_numpy_version| or later.
+* The core package and affiliated packages should be importable with no
+ dependencies other than components already in the Astropy core, the
+ `Python Standard Library <https://docs.python.org/library/index.html>`_,
+ and NumPy_ |minimum_numpy_version| or later.
* The package should be importable from the source tree at build time. This
means that, for example, if the package relies on C extensions that have
@@ -449,7 +445,7 @@ example::
x = np.array([1.0, 2.0, 3.0], dtype=[(str('name'), '>f8')])
The same is true of structure specifiers in the built-in `struct`
-module on Python 2.6.
+module on Python 2.7.
``pytest.mark.skipif`` also requires a "native" string, i.e.::
diff --git a/docs/development/workflow/development_workflow.rst b/docs/development/workflow/development_workflow.rst
index 283bb0e..2bd2174 100644
--- a/docs/development/workflow/development_workflow.rst
+++ b/docs/development/workflow/development_workflow.rst
@@ -433,24 +433,42 @@ to GitHub. GitHub will automatically update your pull request.
Rebase, but only if asked
=========================
-Sometimes the maintainers of Astropy will ask you to *rebase* your changes
-before they are merged into the main Astropy repository.
+Sometimes the maintainers of Astropy may ask a pull request to be *rebased*
+or *squashed* in the process of reviewing a pull request for merging into
+the main Astropy *master* repository.
-Conceptually, rebasing means taking your changes and applying them to the latest
-version of the development branch of the official astropy as though that was the
-version you had originally branched from.
+The decisions of when to request a *squash* or *rebase* are left to
+individual maintainers. These may be requested to reduce the number of
+visible commits saved in the repository history, or because of code changes
+in Astropy in the meantime. A rebase may be necessary to allow the Continious
+Integration tests to run. Both involve rewriting the `git`_ history, meaning
+that commit hashes will change, which is why you should do it only if asked.
-Behind the scenes, `git`_ is deleting the changes and branch you made, making the
-changes others made to the development branch of Astropy, then re-making your
-branch from the development branch and applying your changes to your branch.
-This results in re-writing the history of commits, which is why you should do it
-only if asked.
+Conceptually, rebasing means taking your changes and applying them to the latest
+version of the development branch of the official Astropy as though that was the
+version you had originally branched from. Each individual commit remains
+visible, but with new metadata/commit hashes. Squashing commits changes the
+metadata/commit hash, and also removes separate visibility of individual
+commits; a new commit and commit message will only contain a textual
+list of the earlier commits.
It is easier to make mistakes rebasing than other areas of `git`_, so before you
start make a branch to serve as a backup copy of your work::
git branch tmp my-new-feature # make temporary branch--will be deleted later
+After altering the history, e.g. with ``git rebase``, a normal ``git push``
+is prevented, and a ``git push --force`` will be required.
+
+.. _howto_rebase:
+
+How to rebase
+=============
+
+Behind the scenes, `git`_ is deleting the changes and branch you made, making the
+changes others made to the development branch of Astropy, then re-making your
+branch from the development branch and applying your changes to your branch.
+
The actual rebasing is usually easy::
git fetch astropy master # get the latest development astropy
@@ -460,17 +478,47 @@ You are more likely to run into *conflicts* here--places where the changes you
made conflict with changes that someone else made--than anywhere else. Ask for
help if you need it.
-After the rebase you need to push your changes to GitHub; you will need force
-the push because `git`_ objects to re-writing the history of the repository
-after you have pushed it somewhere::
+.. _howto_squash:
+
+How to squash
+=============
+
+Typically we ask to *squash* when there was a fair amount of trial
+and error, but the final patch remains quite small, or when files were added
+and removed (especially binary files or files that should not remain in the
+repository) or if the number of commits in the history is disproportionate
+compared to the work being carried out (for example 30 commits gradually
+refining a final 10-line change). Conceptually this is equivalent to
+exporting the final diff from a feature branch, then starting a new branch and
+applying only that patch.
+
+Many of us find that is it actually easiest to squash using rebase. In particular,
+you can rebase and squash within the existing branch using::
+
+ git fetch upstream
+ git rebase -i upstream/master
+
+The last command will open an editor with all your commits, allowing you to
+squash several commits together, rename them, etc. Helpfully, the file you are
+editing has the instructions on what to do.
+
+.. _howto_push_force:
+
+How to push
+===========
+
+After using ``git rebase`` you will still need to push your changes to
+GitHub so that they are visible to others and the pull request can be
+updated. Use of a simple ``git push`` will be prevented because of the
+changed history, and will need to be manually overridden using::
- git push -f
+ git push --force
If you run into any problems, do not hesitate to ask. A more detailed conceptual
discussing of rebasing is at :ref:`rebase-on-trunk`.
-Once your rebase is successfully pushed to GitHub you can delete the backup
-branch you made::
+Once the modifications and new git history are successfully pushed to GitHub you
+can delete any backup branches that may have been created::
git branch -D tmp
diff --git a/docs/install.rst b/docs/install.rst
index 421e22a..2cc60a0 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -7,7 +7,7 @@ Requirements
Astropy has the following strict requirements:
-- `Python <http://www.python.org/>`_ 2.7, 3.3, 3.4 or 3.5
+- `Python <http://www.python.org/>`_ 2.7, 3.3, 3.4, 3.5 or 3.6
- Prior to Astropy v1.0, Python 3.1 and 3.2 were also supported
@@ -120,7 +120,7 @@ run::
Binary installers
-----------------
-Binary installers are available on Windows for Python 2.6, 2.7, and >= 3.3
+Binary installers are available on Windows for Python 2.7, and >= 3.3
at `PyPI <https://pypi.python.org/pypi/astropy>`_.
.. _testing_installed_astropy:
diff --git a/docs/known_issues.rst b/docs/known_issues.rst
index 570bce3..aafbfde 100644
--- a/docs/known_issues.rst
+++ b/docs/known_issues.rst
@@ -129,7 +129,6 @@ not limited to
* OS X, Python 2.7.5 via homebrew
* Linux, Python 2.7.6 via conda [#]_
-* Linux, Python 2.6.9 via conda
are built without support for the ``bsddb`` module, resulting in an error
such as::
@@ -171,18 +170,6 @@ This can be resolved by upgrading to Python 2.7.4 or later (at the time of
writing, the latest Python 2.7.x version is 2.7.9).
-Floating point precision issues on Python 2.6 on Microsoft Windows
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-When converting floating point numbers to strings on Python 2.6 on a
-Microsoft Windows platform, some of the requested precision may be
-lost.
-
-The easiest workaround is to install Python 2.7.
-
-The Python issue: http://bugs.python.org/issue7117
-
-
Color printing on Windows
^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/setup.py b/setup.py
index 20f5740..eb7d983 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ import astropy
NAME = 'astropy'
# VERSION should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386)
-VERSION = '1.3.1'
+VERSION = '1.3.2'
# Indicates if this version is a release version
RELEASE = 'dev' not in VERSION
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/python-astropy.git
More information about the Debian-astro-commits
mailing list