Skip to content
This repository has been archived by the owner on Feb 28, 2018. It is now read-only.

Method to format the matrix when logging #28

Merged
merged 1 commit into from
Jan 22, 2018
Merged

Method to format the matrix when logging #28

merged 1 commit into from
Jan 22, 2018

Conversation

Radilx
Copy link
Contributor

@Radilx Radilx commented Jan 21, 2018

The visualize method is great, but when I'm trying to debug creating an element like that can be annoying. I added a pprint method that logs the Matrix to the console much more nicely:

[ [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ],
  [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ],
  [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ] 

This way, you can easily see the dimensions.

Added the `pprint` method so that the matrix is formatted nicely in the console. Helps with debugging.
@shiffman
Copy link
Owner

Thank you for this! I've also been using console.table() which is very useful.

@shiffman shiffman merged commit 50f5cb8 into shiffman:master Jan 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants