https://github.com/xtensor-stack/xtensor-io

xtensor plugin to read and write images, audio files, numpy (compressed) npz and HDF5

https://github.com/xtensor-stack/xtensor-io

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 15 committers (13.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary

Keywords

audio-files compressed cpp hdf5 image-files io npz numpy xtensor

Keywords from Contributors

c-plus-plus-14 multidimensional-arrays tensors conda bindings jupyterlab package-management docs
Last synced: 5 months ago · JSON representation

Repository

xtensor plugin to read and write images, audio files, numpy (compressed) npz and HDF5

Basic Info
  • Host: GitHub
  • Owner: xtensor-stack
  • License: bsd-3-clause
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 747 KB
Statistics
  • Stars: 86
  • Watchers: 16
  • Forks: 28
  • Open Issues: 23
  • Releases: 7
Topics
audio-files compressed cpp hdf5 image-files io npz numpy xtensor
Created over 8 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

xtensor-io

Azure Pipelines ReadTheDocs Binder Join the Gitter Chat

Reading and writing image, sound and npz file formats to and from xtensor data structures.
Try it live in the browser!

Introduction

xtensor-io offers an API to read and write various file formats into xtensor data structures:

  • images,
  • audio files,
  • NumPy's compressed storage format (NPZ),
  • HDF5 files,
  • Blosc.

xtensor-io wraps the OpenImageIO, libsndfile, zlib, HighFive, and blosc libraries.

Installation

xtensor-io is a header-only library. We provide a package for the mamba (or conda) package manager.

bash mamba install xtensor-io -c conda-forge

  • xtensor-io depends on xtensor ^0.25.0.

  • OpenImageIO, libsndfile, zlib, HighFive, and blosc are optional dependencies to xtensor-io

    • OpenImageIO is required to read and write image files.
    • libsndfile is required to read and write sound files.
    • zlib is required to load NPZ files.
    • HighFive (and the HDF5 library) is required to read and write HDF5 files.
    • blosc is required to read and write Blosc files.

All five libraries are available for the conda package manager.

You can also install xtensor-io from source:

mkdir build cd build cmake .. make sudo make install

Trying it online

To try out xtensor-io interactively in your web browser, just click on the binder link:

Binder

Documentation

To get started with using xtensor-io, check out the full documentation

http://xtensor-io.readthedocs.io/

Usage

```cpp // loads png image into xarray with shape HEIGHT x WIDTH x CHANNELS auto imgarr = xt::loadimage("test.png");

// write xarray out to JPEG image xt::dumpimage("dumptest.jpg", imgarr + 5);

// load npz file containing multiple arrays auto npymap = xt::loadnpz("test.npz");

auto arr0 = npymap["arr0"].cast(); auto arr1 = npymap["arr1"].cast();

// open a wav file auto audio = xt::loadaudio("files/xtensor.wav"); auto& audioarr = std::get<1>(audio); // audio contents (like scipy.io.wavfile results)

// save a sine wave sound int freq = 2000; int sampling_freq = 44100; double duration = 1.0;

auto t = xt::arange(0.0, duration, 1.0 / samplingfreq); auto y = xt::sin(2.0 * xt::numericconstants::PI * freq * t);

xt::dumpaudio("files/sine.wav", y, samplingfreq); ```

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.

Owner

  • Name: Xtensor Stack
  • Login: xtensor-stack
  • Kind: organization

Data structures for data sciences

GitHub Events

Total
  • Watch event: 4
  • Issue comment event: 2
Last Year
  • Watch event: 4
  • Issue comment event: 2

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 217
  • Total Committers: 15
  • Avg Commits per committer: 14.467
  • Development Distribution Score (DDS): 0.705
Past Year
  • Commits: 4
  • Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Johan Mabille j****e@g****m 64
David Brochart d****t@g****m 58
Wolf Vollprecht w****t@g****m 33
Sylvain Corlay s****y@g****m 22
Andrew Hardin a****t@g****m 11
Phillip Cloud c****d@g****m 6
Tom de Geus t****m@g****e 5
Ullrich Koethe u****e@i****e 3
Zhihao Yuan zy@s****m 3
hychiang@cml23 k****2@g****m 3
sg-james j****s@s****m 3
Dženan Zukić d****c@k****m 3
DOMINIQUE GEFFROY g****e@f****r 1
Eric Fang e****y@g****m 1
hankliu5 y****9@u****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 23
  • Total pull requests: 82
  • Average time to close issues: 7 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 16
  • Total pull request authors: 9
  • Average comments per issue: 0.57
  • Average comments per pull request: 0.85
  • Merged pull requests: 73
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • davidbrochart (4)
  • JohanMabille (3)
  • tdegeus (2)
  • raphaelsulzer (2)
  • CHN-beta (1)
  • hankliu5 (1)
  • dzenanz (1)
  • pberger514 (1)
  • jerome-colin (1)
  • zhihaoy (1)
  • wolfv (1)
  • yurivict (1)
  • sg-james (1)
  • MiraaChan (1)
  • Sagigamil (1)
Pull Request Authors
  • davidbrochart (38)
  • JohanMabille (29)
  • SylvainCorlay (5)
  • sg-james (3)
  • cpcloud (3)
  • tdegeus (2)
  • dzenanz (2)
  • arjundashrath (1)
  • hankliu5 (1)
Top Labels
Issue Labels
Documentation (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads: unknown
  • Total dependent packages: 7
    (may contain duplicates)
  • Total dependent repositories: 5
    (may contain duplicates)
  • Total versions: 26
  • Total maintainers: 1
spack.io: xtensor

Multi-dimensional arrays with broadcasting and lazy computing

  • Versions: 7
  • Dependent Packages: 6
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 9.7%
Average: 11.9%
Forks count: 18.8%
Stargazers count: 18.9%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: xtensor-io

This library enables loading of many image formats into xtensor/xarrays and NPZ.

  • Versions: 19
  • Dependent Packages: 1
  • Dependent Repositories: 5
Rankings
Dependent repos count: 14.8%
Average: 28.3%
Dependent packages count: 29.0%
Forks count: 33.7%
Stargazers count: 35.8%
Last synced: 6 months ago

Dependencies

.github/workflows/main.yml actions
  • actions/checkout v3 composite
  • mamba-org/setup-micromamba main composite
docs/environment.yml pypi
environment.yml pypi