File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Example : Reading images, audio and NPZ files
2222
2323 int main()
2424 {
25- // loads png image into xarray with shape WIDTH x HEIGHT x CHANNELS
25+ // loads png image into xarray with shape HEIGHT x WIDTH x CHANNELS
2626 auto arr = xt::load_image("test.png");
2727
2828 // write xarray out to JPEG image
@@ -37,7 +37,7 @@ Example : Reading images, audio and NPZ files
3737 // open a wav file
3838 auto audio = xt::load_audio("files/xtensor.wav");
3939 std::cout << "Sampling Frequency: " << std::get<0>(audio) << std::endl;
40- auto& arr = std::get<1>(audio); // audio contents (like scipy.io.wavfile results)
40+ auto& arr = std::get<1>(audio); // audio contents (like scipy.io.wavfile results)
4141
4242 // save a sine wave sound
4343 int freq = 2000;
Original file line number Diff line number Diff line change 1414
1515#include < sndfile.hh>
1616
17- #include " xtensor/xarray.hpp"
18- #include " xtensor/xeval.hpp"
17+ #include < xtensor/xarray.hpp>
18+ #include < xtensor/xeval.hpp>
1919
2020#include " xtensor_io_config.hpp"
21- #pragma cling load("sndfile")
21+
22+ #ifdef __CLING__
23+ #pragma cling load("sndfile")
24+ #endif
2225
2326namespace xt
2427{
Original file line number Diff line number Diff line change 99#ifndef XTENSOR_IO_XIMAGE_HPP
1010#define XTENSOR_IO_XIMAGE_HPP
1111
12+ #include < cstddef>
1213#include < stdexcept>
1314#include < string>
1415
15- #include " xtensor/xarray.hpp"
16- #include " xtensor/xeval.hpp"
16+ #include < xtensor/xarray.hpp>
17+ #include < xtensor/xeval.hpp>
1718
1819#include " xtensor_io_config.hpp"
1920
@@ -39,7 +40,7 @@ namespace xt
3940 * @param filename The path of the file to load
4041 *
4142 * @return xarray with image contents. The shape of the xarray
42- * is ``WIDTH x HEIGHT x CHANNELS`` of the loaded image, where
43+ * is ``HEIGHT x WIDTH x CHANNELS`` of the loaded image, where
4344 * ``CHANNELS`` are ordered in standard ``R G B (A)``.
4445 */
4546 template <class T = unsigned char >
Original file line number Diff line number Diff line change 2929#include < xtensor/xnpy.hpp>
3030
3131#include " xtensor_io_config.hpp"
32- #pragma cling load("z")
32+
33+ #ifdef __CLING__
34+ #pragma cling load("z")
35+ #endif
3336
3437namespace xt
3538{
You can’t perform that action at this time.
0 commit comments