From c5f76110ed0c48c5c665bf284b7404fc4e5e79d5 Mon Sep 17 00:00:00 2001 From: Morgan Williams Date: Fri, 1 Nov 2024 15:58:23 +1100 Subject: [PATCH] Update get_ionic_radii test --- pyrolite/geochem/ind.py | 2 +- test/geochem/geochem_ind.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyrolite/geochem/ind.py b/pyrolite/geochem/ind.py index 5090b541..dd2783c5 100644 --- a/pyrolite/geochem/ind.py +++ b/pyrolite/geochem/ind.py @@ -429,7 +429,7 @@ def get_ionic_radii( Returns -------- - :class:`pandas.Series` | :class:`float` + :class:`pandas.Series` | :class:`numpy.ndarray` | :class:`float` Series with viable ion charge and coordination, with associated radii in angstroms. If the ion charge and coordiation are completely specified and found in the table, a single value will be returned instead. diff --git a/test/geochem/geochem_ind.py b/test/geochem/geochem_ind.py index 87929848..714bdfa5 100644 --- a/test/geochem/geochem_ind.py +++ b/test/geochem/geochem_ind.py @@ -1,5 +1,6 @@ import unittest +import numpy as np import periodictable as pt from pyrolite.geochem.ind import ( @@ -258,11 +259,11 @@ def test_ree_radii(self): def test_ree_radii_list(self): radii = get_ionic_radii(self.ree, charge=3, coordination=8) - self.assertTrue(isinstance(radii, list)) + self.assertTrue(isinstance(radii, np.ndarray)) def test_ree_radii_list_whittaker_muntus(self): radii = get_ionic_radii(self.ree, charge=3, coordination=8, source="whittaker") - self.assertTrue(isinstance(radii, list)) + self.assertTrue(isinstance(radii, np.ndarray)) class TestByIncompatibility(unittest.TestCase):