
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
ndarray-squeeze
Advanced tools
Remove singleton dimensions from an ndarray
This module takes an input ndarray and removes any dimensions with length 1 or, optionally, specified dimensions with length 1.
var ndarray = require('ndarray')
var squeeze = require('ndarray-squeeze')
squeeze(ndarray([1, 2, 3, 4], [2, 1, 1, 2, 1]))
// => ndarray([1, 2, 3, 4], [2, 2])
squeeze(ndarray([1, 2, 3, 4], [2, 1, 1, 2, 1]), [1])
// => ndarray([1, 2, 3, 4], [2, 1, 2, 1])
$ npm install ndarray-squeeze
require('ndarray-squeeze')(input[, axes])Arguments:
input: The input ndarray to be squeezedaxes (optional): An Array list of dimensions to be squeezed. Non-singleton dimensions will be ignored. If not provided, all singleton dimensions will be removed.Returns: A new array view of the squeezed ndarray (i.e. a new ndarray object with the same underlying data).
© 2016 Ricky Reusser. MIT License.
FAQs
Remove singleton dimensions from an ndarray
The npm package ndarray-squeeze receives a total of 65 weekly downloads. As such, ndarray-squeeze popularity was classified as not popular.
We found that ndarray-squeeze 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
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.