CV_Assert(starts.size() == ends.size());
if (axis > 0) {
+ CV_CheckLE(axis, 1024, "Slice layer can't have more than 1024 axes"); // arbitrary limit
begin.resize(axis, 0);
- end.resize(axis, -1);
+ end.resize(axis, INT_MAX);
}
for (int i = 0; i < starts.size(); ++i)
{
"global module")
self.assertEqual(cv.ml.Boost, cv.ml_Boost,
msg="Classes from submodules and global module don't refer "
- def test_inner_class_has_global_alias(self):
- self.assertTrue(hasattr(cv.SimpleBlobDetector, "Params"),
- msg="Class is not registered as inner class")
- self.assertEqual(cv.SimpleBlobDetector.Params, cv.SimpleBlobDetector_Params,
- msg="Inner class and class in global module don't refer "
- "to the same type")
- self.assertTrue(hasattr(cv, "SimpleBlobDetector_Params"),
- msg="Inner class doesn't have alias in the global module")
-
+ "to the same type")
+
+ def test_class_from_submodule_has_global_alias(self):
+ self.assertTrue(hasattr(cv.ml, "Boost"),
+ msg="Class is not registered in the submodule")
+ self.assertTrue(hasattr(cv, "ml_Boost"),
+ msg="Class from submodule doesn't have alias in the "
+ "global module")
+ self.assertEqual(cv.ml.Boost, cv.ml_Boost,
+ msg="Classes from submodules and global module don't refer "
"to the same type")
def test_inner_class_has_global_alias(self):