Karsten Schmidt<p><a href="https://mastodon.thi.ng/tags/ReleaseWednesday" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ReleaseWednesday</span></a> 🚀 — I wonder how many other FLOSS devs are sitting on code for ~8 years prior to first release... In one of these cases (many others readily available in my stash 🙃), triggered by recent major updates to the thi.ng/vectors library, I've refactored (almost 100% rewritten) and applied the same approach to the new/old package:</p><p><a href="https://thi.ng/tensors" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/tensors</span><span class="invisible"></span></a></p><p>This package provides 1D/2D/3D/4D tensors, supporting different storage implementations (currently still all CPU side only) and an extensible set of polymorphic tensor operations (currently ~45 math ops, incl. matrix-matrix/matrix-vector products, reductions, argmin/max, activation functions etc.). The tensor classes themselves also provide several zero-copy slicing, re-ordering, clipping, extraction functions, most of them type-safe.</p><p>The original (private) version was heavily reliant on dynamic code generation, which has now been replaced with higher-order functions to provide various dimension-optimized versions of all operations.</p><p>This package is NOT specifically aimed at machine learning, even though it could probably used for some tasks in that realm (likely with extra hand holding). There are many other use cases for this kind of data structure...</p><p>Also new in other packages in this release cycle (incl. some code examples):</p><p>- <a href="https://docs.thi.ng/umbrella/arrays/functions/permutation.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">docs.thi.ng/umbrella/arrays/fu</span><span class="invisible">nctions/permutation.html</span></a><br>- <a href="https://docs.thi.ng/umbrella/bidir-index/functions/decodeObjectIterator.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">docs.thi.ng/umbrella/bidir-ind</span><span class="invisible">ex/functions/decodeObjectIterator.html</span></a><br>- <a href="https://docs.thi.ng/umbrella/transducers/functions/binned.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">docs.thi.ng/umbrella/transduce</span><span class="invisible">rs/functions/binned.html</span></a></p><p><a href="https://mastodon.thi.ng/tags/ThingUmbrella" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ThingUmbrella</span></a> <a href="https://mastodon.thi.ng/tags/TypeScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TypeScript</span></a> <a href="https://mastodon.thi.ng/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.thi.ng/tags/Tensor" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Tensor</span></a> <a href="https://mastodon.thi.ng/tags/OpenSource" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OpenSource</span></a></p>