diff options
author | Jules Chéron <jules.cheron@gmail.com> | 2021-11-18 22:57:05 +0100 |
---|---|---|
committer | Jules Chéron <jules.cheron@gmail.com> | 2022-01-15 17:19:13 +0100 |
commit | 6d6acc940419ccd7ceaa856b29184434a9eb24bb (patch) | |
tree | 40923f57e802fa8ef2c0d03990155ada50f93812 /pint/testsuite/test_quantity.py | |
parent | c6868370e8717936b54f6f54b011231824b50b55 (diff) | |
download | pint-6d6acc940419ccd7ceaa856b29184434a9eb24bb.tar.gz |
Fix #1184 to_reduced with ndarray of int
Do not use ito with to_reduced function
Diffstat (limited to 'pint/testsuite/test_quantity.py')
-rw-r--r-- | pint/testsuite/test_quantity.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pint/testsuite/test_quantity.py b/pint/testsuite/test_quantity.py index 8f68262..b5413f4 100644 --- a/pint/testsuite/test_quantity.py +++ b/pint/testsuite/test_quantity.py @@ -635,6 +635,13 @@ class TestQuantity(QuantityTestCase): assert math.isnan(test.magnitude) assert ref != test + @helpers.requires_numpy + def test_to_reduced_units(self): + q = self.Q_([3, 4], "s * ms") + helpers.assert_quantity_equal( + q.to_reduced_units(), self.Q_([3000.0, 4000.0], "ms**2") + ) + class TestQuantityToCompact(QuantityTestCase): def assertQuantityAlmostIdentical(self, q1, q2): |