diff --git a/docs/source/basic_usage.rst b/docs/source/basic_usage.rst index 862594b..0252f51 100644 --- a/docs/source/basic_usage.rst +++ b/docs/source/basic_usage.rst @@ -22,7 +22,7 @@ Example : Reading images, audio and NPZ files int main() { - // loads png image into xarray with shape WIDTH x HEIGHT x CHANNELS + // loads png image into xarray with shape HEIGHT x WIDTH x CHANNELS auto arr = xt::load_image("test.png"); // write xarray out to JPEG image @@ -37,7 +37,7 @@ Example : Reading images, audio and NPZ files // open a wav file auto audio = xt::load_audio("files/xtensor.wav"); std::cout << "Sampling Frequency: " << std::get<0>(audio) << std::endl; - auto& arr = std::get<1>(audio); // audio contents (like scipy.io.wavfile results) + auto& arr = std::get<1>(audio); // audio contents (like scipy.io.wavfile results) // save a sine wave sound int freq = 2000; diff --git a/include/xtensor-io/xaudio.hpp b/include/xtensor-io/xaudio.hpp index 7c42fb7..4d7dd28 100644 --- a/include/xtensor-io/xaudio.hpp +++ b/include/xtensor-io/xaudio.hpp @@ -14,11 +14,14 @@ #include -#include "xtensor/xarray.hpp" -#include "xtensor/xeval.hpp" +#include +#include #include "xtensor_io_config.hpp" -#pragma cling load("sndfile") + +#ifdef __CLING__ + #pragma cling load("sndfile") +#endif namespace xt { diff --git a/include/xtensor-io/ximage.hpp b/include/xtensor-io/ximage.hpp index d8025ad..ea7dedc 100644 --- a/include/xtensor-io/ximage.hpp +++ b/include/xtensor-io/ximage.hpp @@ -9,11 +9,12 @@ #ifndef XTENSOR_IO_XIMAGE_HPP #define XTENSOR_IO_XIMAGE_HPP +#include #include #include -#include "xtensor/xarray.hpp" -#include "xtensor/xeval.hpp" +#include +#include #include "xtensor_io_config.hpp" @@ -39,7 +40,7 @@ namespace xt * @param filename The path of the file to load * * @return xarray with image contents. The shape of the xarray - * is ``WIDTH x HEIGHT x CHANNELS`` of the loaded image, where + * is ``HEIGHT x WIDTH x CHANNELS`` of the loaded image, where * ``CHANNELS`` are ordered in standard ``R G B (A)``. */ template diff --git a/include/xtensor-io/xnpz.hpp b/include/xtensor-io/xnpz.hpp index 46531b1..6ddd69f 100644 --- a/include/xtensor-io/xnpz.hpp +++ b/include/xtensor-io/xnpz.hpp @@ -29,7 +29,10 @@ #include #include "xtensor_io_config.hpp" -#pragma cling load("z") + +#ifdef __CLING__ + #pragma cling load("z") +#endif namespace xt {