Skip to content
Snippets Groups Projects
Commit acb69801 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Get rows and cols from data instead of type

parent 494eeaa9
No related branches found
No related tags found
Loading
......@@ -104,7 +104,9 @@ namespace armarx::aron
TypedDataDisplayVisitor::processMatrix(const type::Matrix& type, const data::NDArray& data)
{
Eigen::Map<Eigen::Matrix<ScalarT, Eigen::Dynamic, Eigen::Dynamic>> m(
reinterpret_cast<ScalarT*>(data.getData()), type.getRows(), type.getCols());
reinterpret_cast<ScalarT*>(data.getData()),
data.getShape().at(0),
data.getShape().at(1));
value << m.format(eigenIof);
}
......@@ -161,7 +163,7 @@ namespace armarx::aron
auto t = *type::Matrix::DynamicCastAndCheck(type);
auto d = *data::NDArray::DynamicCastAndCheck(data);
if (std::max(t.getRows(), t.getCols()) > 10)
if (std::max(d.getShape().at(0), d.getShape().at(1)) > 10)
{
// Just show the shape.
value << DataDisplayVisitor::getValue(data);
......
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