Skip to content

Commit b924b8f

Browse files
Merge pull request #25 from SylvainCorlay/fixup-docs
Fixup documentation
2 parents bd5a087 + 4375a18 commit b924b8f

4 files changed

Lines changed: 16 additions & 9 deletions

File tree

docs/source/basic_usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

include/xtensor-io/xaudio.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
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

2326
namespace xt
2427
{

include/xtensor-io/ximage.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
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>

include/xtensor-io/xnpz.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
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

3437
namespace xt
3538
{

0 commit comments

Comments
 (0)