From 2d2d6d5762c3e408250c36ee4a1448b040dafb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 25 Jul 2019 13:28:08 +0200 Subject: [PATCH] magnum: one more test to really check all variants. --- src/python/magnum/test/test_math_numpy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/python/magnum/test/test_math_numpy.py b/src/python/magnum/test/test_math_numpy.py index a2d5707..7a4e105 100644 --- a/src/python/magnum/test/test_math_numpy.py +++ b/src/python/magnum/test/test_math_numpy.py @@ -85,6 +85,9 @@ class Vector(unittest.TestCase): a = Vector2d(np.array([1.0, 2.0], dtype='float32')) self.assertEqual(a, Vector2d(1.0, 2.0)) + a = Vector2(np.array([1.0, 2.0], dtype='float64')) + self.assertEqual(a, Vector2(1.0, 2.0)) + def test_type_from_numpy_invalid_float(self): a = np.array([1, 2, 3]) self.assertEqual(a.dtype, 'int64')