Eigen is a fantastic matrix and linear algebra library for C++, which I highly recommend.
Since it's important to be able to see inside a matrix while debugging, Eigen has provided Python "pretty printer" scripts for debuggers. The scripts for gdb (the debugger I use), are located in eigen/debug/gdb. Note: package managers may not include this directory. If you don't have it, you can download a new copy of Eigen here. You don't need to replace your existing installation, just put the eigen/debug/gdb directory somewhere and use that for the instructions below. If you follow the directions in the comments of printers.py (in this directory), you can set up gdb so that it will print the contents of the matrix rather than some obscure sequence of pointers and iterators when you are debugging. Great! Recently, however, I started seeing the pointers and iterators again instead of the content. I also started getting errors like: TypeError: 'map' object is not subscriptable This error is caused by the fact that the printers.py script is in Python 2, while my version of gdb is built in Python 3. To fix this issue, you can use the Python utility 2to3, which automatically converts Python 2 code to Python 3 code. To do this, go to the eigen/debug/gdb directory and run the shell command 2to3 -w printers.py You should be good to go!
4 Comments
12/24/2019 03:33:55 am
The time when printing required to have the printer physically next to it luckily passed. Except in the most basic models
Reply
7/1/2020 03:27:41 am
Over 27 Years Experience with Lease Printers and IT systems & Rent Copiers with ... of finance for office equipment such as an office printer or copier machine.
Reply
Leave a Reply. |