
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
A Python package which provides tools to convert files to and from IDX format (described at http://yann.lecun.com/exdb/mnist/) into numpy.ndarray.
idx2numpy
package provides a tool for converting files to and from
IDX format to numpy.ndarray
. You can meet files in IDX format,
e.g. when you're going to read the MNIST database of handwritten digits provided by Yann LeCun.
The description of IDX format also can be found on this page.
The easiest way to install is by using pip to pull it from PyPI:
pip install idx2numpy
You can also clone the Git repository from Github and install the package manually:
git clone https://github.com/ivanyu/idx2numpy.git
python setup.py install
import idx2numpy
# Reading
ndarr = idx2numpy.convert_from_file('myfile.idx')
f_read = open('myfile.idx', 'rb')
ndarr = idx2numpy.convert_from_file(f_read)
s = f_read.read()
ndarr = idx2numpy.convert_from_string(s)
# Writing
idx2numpy.convert_to_file('myfile_copy.idx', ndarr)
f_write = open('myfile_copy2.idx', 'wb')
idx2numpy.convert_to_file(f_write, ndarr)
s = convert_to_string(ndarr)
MIT license (see LICENSE
file)
FAQs
A Python package which provides tools to convert files to and from IDX format (described at http://yann.lecun.com/exdb/mnist/) into numpy.ndarray.
We found that idx2numpy demonstrated a healthy version release cadence and project activity because the last version was released less than 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
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.