Skip to content
Snippets Groups Projects
Verified Commit e6e1bf61 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

map: fix RowMajor case

parent fa699882
No related branches found
No related tags found
No related merge requests found
...@@ -82,16 +82,32 @@ namespace eigenpy ...@@ -82,16 +82,32 @@ namespace eigenpy
rows = (int)PyArray_DIMS(pyArray)[0]; rows = (int)PyArray_DIMS(pyArray)[0];
cols = 1; cols = 1;
inner_stride = (int)PyArray_STRIDE(pyArray, 0) / (int)itemsize; if(EquivalentInputMatrixType::IsRowMajor)
outer_stride = 0; {
outer_stride = (int)PyArray_STRIDE(pyArray, 0) / (int)itemsize;
inner_stride = 0;
}
else
{
inner_stride = (int)PyArray_STRIDE(pyArray, 0) / (int)itemsize;
outer_stride = 0;
}
} }
else else
{ {
rows = 1; rows = 1;
cols = (int)PyArray_DIMS(pyArray)[0]; cols = (int)PyArray_DIMS(pyArray)[0];
inner_stride = 0; if(EquivalentInputMatrixType::IsRowMajor)
outer_stride = (int)PyArray_STRIDE(pyArray, 0) / (int)itemsize; {
inner_stride = (int)PyArray_STRIDE(pyArray, 0) / (int)itemsize;
outer_stride = 0;
}
else
{
inner_stride = 0;
outer_stride = (int)PyArray_STRIDE(pyArray, 0) / (int)itemsize;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment