Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions Modules/Bridge/NumPy/wrapping/test/itkPyVectorContainerTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,7 @@ def setUp(self):
def test_NumPyBridge_VectorContainer(self):
"Try to convert a itk.VectorContainer into a Numpy array and back."

if not (
hasattr(itk.VectorContainer, "ULLF")
and hasattr(itk.PyVectorContainer, "ULLF")
and hasattr(itk.Point, "F3")
and hasattr(itk.VectorContainer, "ULLPF3")
and hasattr(itk.Point, "F2")
and hasattr(itk.VectorContainer, "ULLPF2")
):
# There is insufficient wrapping to perform this test; skip it.
print("Insufficient wrapping to perform itkPyVectorContainerTest")
return

v1 = itk.VectorContainer[itk.ULL, itk.F].New()
v1 = itk.VectorContainer[itk.IT, itk.F].New()
Comment thread
hjmjohnson marked this conversation as resolved.
v1.Reserve(4)
v1.SetElement(0, 1.2)
v1.SetElement(1, 2)
Expand Down Expand Up @@ -78,7 +66,7 @@ def test_NumPyBridge_VectorContainer(self):
self.assertNotEqual(v2_cp.GetElement(0), arr_cp[0])

PointType = itk.Point[itk.F, 3]
v_point = itk.VectorContainer[itk.ULL, PointType].New()
v_point = itk.VectorContainer[itk.IT, PointType].New()
v_point.Reserve(2)
point = PointType()
point[0] = 1.0
Expand All @@ -95,7 +83,7 @@ def test_NumPyBridge_VectorContainer(self):
)

PointType = itk.Point[itk.F, 2]
Comment thread
greptile-apps[bot] marked this conversation as resolved.
v_point = itk.VectorContainer[itk.ULL, PointType].New()
v_point = itk.VectorContainer[itk.IT, PointType].New()
v_point.Reserve(2)
point = PointType()
point[0] = 1.0
Expand Down
Loading