Skip to content

Instantly share code, notes, and snippets.

@cnuernber
Last active May 22, 2020 18:31
Show Gist options
  • Select an option

  • Save cnuernber/7c99b8f559ffca146181e4c85d4a6fb3 to your computer and use it in GitHub Desktop.

Select an option

Save cnuernber/7c99b8f559ffca146181e4c85d4a6fb3 to your computer and use it in GitHub Desktop.

Markdown Inline Format

tech.ml.dataset.print> (println (dataset->str test-ds {:line-policy :markdown}))
| :a |                                                                 :b |
|----|--------------------------------------------------------------------|
|  1 | #tech.v2.tensor<float64>[2 2]<br>[[0.000 1.000]<br> [2.000 3.000]] |
|  2 | #tech.v2.tensor<float64>[2 2]<br>[[0.000 1.000]<br> [2.000 3.000]] |
:a :b
1 #tech.v2.tensor[2 2]
[[0.000 1.000]
[2.000 3.000]]
2 #tech.v2.tensor[2 2]
[[0.000 1.000]
[2.000 3.000]]

Default Repl Format

tech.ml.dataset.print> (println (dataset->str test-ds))
| :a |                            :b |
|----|-------------------------------|
|  1 | #tech.v2.tensor<float64>[2 2] |
|    | [[0.000 1.000]                |
|    |  [2.000 3.000]]               |
|  2 | #tech.v2.tensor<float64>[2 2] |
|    | [[0.000 1.000]                |
|    |  [2.000 3.000]]               |

One Line Format

tech.ml.dataset.print> (println (dataset->str test-ds {:line-policy :single}))
| :a |                            :b |
|----|-------------------------------|
|  1 | #tech.v2.tensor<float64>[2 2] |
|  2 | #tech.v2.tensor<float64>[2 2] |
@genmeblog
Copy link

Wow, cool!

:a :b
1 #tech.v2.tensor[2 2]
[[0.000 1.000]
[2.000 3.000]]
2 #tech.v2.tensor[2 2]
[[0.000 1.000]
[2.000 3.000]]
:a :b
1 #tech.v2.tensor[2 2]
2 #tech.v2.tensor[2 2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment