Skip to content
Snippets Groups Projects

Memory Viewer: Improve display of NdArrays, fix passing -1 as num rows/cols

Merged Rainer Kartmann requested to merge armem-viewer/data-display-ndarray into master
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
@@ -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);
Loading