Skip to content

Commit c66febe

Browse files
committed
numerical linear algebra - svd - made a long image scrollable
1 parent 373adbf commit c66febe

File tree

1 file changed

+7
-4
lines changed
  • projects/math/numerical-linalg/notebooks

1 file changed

+7
-4
lines changed

projects/math/numerical-linalg/notebooks/svd.clj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,13 @@ first-image
138138
((flat-tensors i) j))
139139
:uint8))
140140

141-
;; For visual conveniene, we will display it transposed:
142-
(-> long-tensor
143-
(tensor/transpose [1 0])
144-
bufimg/tensor->image)
141+
(kind/hiccup
142+
[:div
143+
[:h3 "It is interesting to scroll this! 👇"]
144+
[:div {:style {:max-height "400px"
145+
:overflow :auto}}
146+
(bufimg/tensor->image
147+
long-tensor)]])
145148

146149
;; ## Singular value decomposition
147150

0 commit comments

Comments
 (0)