Fix Map() repr to be more sane#2997
Conversation
The old repr was basically unreadable, as it printed the reprs of all sub-containers. This just changes the repr to be actually useful: ```python event.dl1.tel ``` After: ``` Map(ctapipe.containers.DL1CameraContainer: [np.int16(5), np.int16(11)]) ```
I find it a bit weird to see Maybe something like: |
|
mexanick
left a comment
There was a problem hiding this comment.
I actually found the previous verbose repr useful :D But I see the point in making it concise.
It woudl repeat the same container repr for every entry in the map... that's hardly useful. I proposed to change the container repr to show the data content and not the help, but @kosack opposed this. I still think a data containers repr should show its content and not its docstring. |




The old repr was basically unreadable, as it printed the reprs of all sub-containers. This just changes the repr to be actually useful:
After this change:
Before: Too much information was given. The Container reprs are only useful when dealing with a single one, not a list. What the user wants when looking at a Map is just the list of what is inside it.