Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
import arraymancer, arraymancer/linear_algebra
|
||||
|
||||
var m = [[3, 0], [4, 5]].toTensor().asType(float)
|
||||
let (u, s, vt) = m.svd()
|
||||
|
||||
# With "$", floats are displayed with 6 digits.
|
||||
# So we use "pretty" to display 8 digits.
|
||||
|
||||
echo "U:"
|
||||
echo u.pretty(8), '\n'
|
||||
|
||||
echo "Σ:"
|
||||
echo s.pretty(8), '\n'
|
||||
|
||||
echo "V:"
|
||||
echo vt.transpose().pretty(8)
|
||||
Loading…
Add table
Add a link
Reference in a new issue