package
Hash table backed sparse ndarray
npm install ndarray-hashGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Registry package owners.
A sparse ndarray backed by a map (implemented using either Map or an object).
var ndhash = require("ndarray-hash")
//Create a gigantic sparse ndarray
var x = ndhash([10000, 10000])
x.set(100, 100, 1)
console.log(x.get(100, 1000))
console.log(x.get(100, 100))0
1Install using npm:
npm install ndarray-hashrequire("ndarray-hash")(shape)Creates an ndarray hash map with the given shape
shape is the shape of the resulting sparse ndarrayReturns A sparse hash table backed ndarray
(c) 2013 Mikola Lysenko. MIT License
Estimated unpacked size across 4 packages.
26.5 kB
Includes dependencies.