
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
index-align-ndarray
Advanced tools
Given multiple nx2 ndarrays with a index column in ascending order, return a index aligned ndarray.
Good for aligning data based on dates, and the default behavior is to populate the new array's row if and only if there exists same index (data in first column) for all datasets provided.
e.g.
table1
10 1
12 3
15 4
20 1
table2
10 2
11 1
12 4
13 5
15 2
35 2
align([table1,table2]) ->
10 1 2
12 3 4
15 4 2
var ndarray = require('ndarray');
var align = require('index-align-ndarray');
var table1 = ndarray( new Float32Array([1,2,2,3,3,4,9,5]), [4,2], [2,1] );
var table2 = ndarray( new Float32Array([1,8,3,9,6,4,9,5]), [4,2], [2,1] );
var table3 = ndarray( new Float32Array([1,3,3,6,6,4,9,3]), [4,2], [2,1] );
var table4 = ndarray( new Float32Array([1,4,3,7,5,4,9,1]), [4,2], [2,1] );
var table5 = ndarray( new Float32Array([1,5,3,8,6,1,9,0]), [4,2], [2,1] );
var tables = [table1, table2, table3, table4, table5];
align( tables, function( err, data ) {
// do something with returned data
});
2-D Tables only.
FAQs
Get index aligned table from nx2 tables of different length
We found that index-align-ndarray demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.