Skip to content

Commit 81b5f57

Browse files
Update PyUtils.cxx
Wrong assert of size of tensor in `as_tensor2d` function
1 parent 614caaa commit 81b5f57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

larcv/core/PyUtil/PyUtils.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,8 @@ VoxelSet as_tensor2d(PyObject* pyarray, const ImageMeta& meta, float min_thresho
843843
LARCV_CRITICAL() << "Cannot convert to 2D C-array (return code " << ret << ")" << std::endl;
844844
throw larbys();
845845
}
846-
if (dims[1] != 2) {
847-
LARCV_CRITICAL() << "The 2nd dimenstion must be length 2! (length " << dims[1] << ")" << std::endl;
846+
if (dims[1] != 3) {
847+
LARCV_CRITICAL() << "The 2nd dimenstion must be length 3! (length " << dims[1] << ")" << std::endl;
848848
throw larbys();
849849
}
850850
VoxelSet res;

0 commit comments

Comments
 (0)