From 5278ca15f8097d1fbd85b8efb94b3c485ead24c1 Mon Sep 17 00:00:00 2001 From: MARCHAND MANON Date: Mon, 4 Dec 2023 18:04:23 +0100 Subject: [PATCH] fix numpy and docs warnings --- docs/contribute.rst | 2 +- python/mocpy/abstract_moc.py | 2 +- python/mocpy/moc/moc.py | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/contribute.rst b/docs/contribute.rst index 12fe483a..3748ce4e 100644 --- a/docs/contribute.rst +++ b/docs/contribute.rst @@ -84,7 +84,7 @@ Now build package This step will inform you of any issue in the rust part. - After a new version of mocpy goes out, if a ``maturin develop --release`` does not actualize your -``Cargo.toml`` file, you might need to before executing the ``maturin`` command again:: + ``Cargo.toml`` file, you might need to before executing the ``maturin`` command again:: rm Cargo.lock && cargo clean diff --git a/python/mocpy/abstract_moc.py b/python/mocpy/abstract_moc.py index 575e444d..47fbda91 100644 --- a/python/mocpy/abstract_moc.py +++ b/python/mocpy/abstract_moc.py @@ -545,7 +545,7 @@ def from_str(cls, value): See Also -------- - ``from_string`` a duplicate of this method, with added ``fold`` option + from_string: a duplicate of this method, with added ``fold`` option """ # TODO : decide if we want to remove this duplicated method return cls.from_string(value, format="ascii") diff --git a/python/mocpy/moc/moc.py b/python/mocpy/moc/moc.py index f80ffd47..c7f21c04 100644 --- a/python/mocpy/moc/moc.py +++ b/python/mocpy/moc/moc.py @@ -855,8 +855,8 @@ def from_elliptical_cone(cls, lon, lat, a, b, pa, max_depth, delta_depth=2): ... ) """ index = mocpy.from_elliptical_cone( - lon, - lat, + lon[0], + lat[0], np.float64(a.to_value(u.deg)), np.float64(b.to_value(u.deg)), np.float64(pa.to_value(u.deg)), @@ -908,8 +908,8 @@ def from_cone(cls, lon, lat, radius, max_depth, delta_depth=2): ... ) """ index = mocpy.from_cone( - lon, - lat, + lon[0], + lat[0], np.float64(radius.to_value(u.deg)), np.uint8(max_depth), np.uint8(delta_depth), @@ -970,8 +970,8 @@ def from_ring( ... ) """ index = mocpy.from_ring( - lon, - lat, + lon[0], + lat[0], np.float64(internal_radius.to_value(u.deg)), np.float64(external_radius.to_value(u.deg)), np.uint8(max_depth),