python
gtsam
tests
test_Point2.py
Go to the documentation of this file.
1
"""
2
GTSAM Copyright 2010-2019, Georgia Tech Research Corporation,
3
Atlanta, Georgia 30332-0415
4
All Rights Reserved
5
6
See LICENSE for the license information
7
8
Point2 unit tests.
9
Author: Frank Dellaert & Fan Jiang
10
"""
11
import
unittest
12
13
import
gtsam
14
import
numpy
as
np
15
from
gtsam.utils.test_case
import
GtsamTestCase
16
17
18
class
TestPoint2
(
GtsamTestCase
):
19
"""Test selected Point2 methods."""
20
21
def
test_constructors
(self):
22
"""Test constructors from doubles and vectors."""
23
expected =
gtsam.Point2
(1, 2)
24
actual =
gtsam.Point2
(np.array([1, 2]))
25
np.testing.assert_array_equal(actual, expected)
26
27
28
if
__name__ ==
"__main__"
:
29
unittest.main()
test_Point2.TestPoint2.test_constructors
def test_constructors(self)
Definition:
test_Point2.py:21
gtsam::Point2
Vector2 Point2
Definition:
Point2.h:32
test_Point2.TestPoint2
Definition:
test_Point2.py:18
gtsam::utils.test_case
Definition:
test_case.py:1
gtsam::utils.test_case.GtsamTestCase
Definition:
test_case.py:15
gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:37:46