We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f1bc01 commit ec4350bCopy full SHA for ec4350b
unittest/python/test_std_vector.py
@@ -98,3 +98,12 @@ def checkZero(v):
98
# Test mutable __getitem__
99
l5[0][:] = 0.0
100
assert np.allclose(l5[0], 0.0)
101
+
102
+# Test slicing
103
+l6 = eigenpy.StdVec_VectorXd()
104
+for _ in range(4):
105
+ l6.append(np.random.randn(3))
106
+checkAllValues(l6[:1], l6.tolist()[:1])
107
+checkAllValues(l6[1:], l6.tolist()[1:])
108
+checkAllValues(l6[:-1], l6.tolist()[:-1])
109
+checkAllValues(l6[::2], l6.tolist()[::2])
0 commit comments