Improve prettyprinting of multidimensional numpy arrays. #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Items are now aligned by relying on numpy's own implementation.
Fixes most of #49.
It looks like I needed to insert hard linebreaks myself to get the right indentation. One minor remaining problematic point is that the array's dtype gets printed on the same line as the array (if it fits) rather than on a separate line:
I guess the proper fix would be to move the dtype-handling logic from pretty_numpy to pretty_arraywrapper as well, but this would also require (I think?) duplicating some of the pretty_call logic, so it won't be for this PR...