You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://gitter.im/QuantStack/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5
+
6
+
7
+
xtensor-io offers a couple of functions to read and write images, audio files, and
8
+
NumPy's compressed storage format (NPZ) from C++ into xtensor data structures.
9
+
It makes use of well known libraries for image and audio handling (OpenImageIO and libsndfile).
10
+
Currently, only a few basic functions are provided, but upon demand we can consider to
11
+
improve the interface and offer more options to customize and improve the input-output
12
+
performance.
13
+
14
+
We haven't started building and testing on Windows, yet! Contributions welcome!
15
+
16
+
### Example
8
17
9
18
```cpp
10
19
// loads png image into xarray with shape WIDTH x HEIGHT x CHANNELS
@@ -18,14 +27,70 @@ auto npy_map = xt::load_npz("test.npz");
18
27
19
28
auto arr_0 = npy_map["arr_0"].cast<double>();
20
29
auto arr_1 = npy_map["arr_1"].cast<unsignedlong>();
0 commit comments