xtensor icon indicating copy to clipboard operation
xtensor copied to clipboard

xshape docs: doxygen error

Open nathan-mxr opened this issue 1 year ago • 1 comments

Public documentation for xshape: https://xtensor.readthedocs.io/en/stable/api/xshape.html Displays a doxygen error. Screenshot 2022-07-22 135549

nathan-mxr avatar Jul 22 '22 12:07 nathan-mxr

Thanks for reporting. Related: https://github.com/xtensor-stack/xtensor/issues/2480

tdegeus avatar Jul 26 '22 08:07 tdegeus

I've cloned the master branch as of today (latest commit: 5f45138), and run the build instructions for the docs - I'm still seeing errors: doxygengroup: Cannot find namespace “xt_xshape” in doxygen xml output for project “xtensor” from directory: ../xml

Am I missing something here?

stellarpower avatar Dec 28 '22 15:12 stellarpower

Thanks, should be fixed in https://github.com/xtensor-stack/xtensor/pull/2624

tdegeus avatar Dec 28 '22 16:12 tdegeus

Cheers, looks good to me.

As an aside, as the contents weren't quite what I was originally looking for - is there a way I can get the shape of a tensor at compile-time? E.g., Let's say I have an operation in my code, defined over two arguments - a 3N4 tensor and a 3N1 tensor. I'm aiming to build up a small library of concepts so I can appropriately constrain functions like this where shapes are known at compile-time. I know we have shape() and dimension() for arrays; do we have an equivalent that can function at compile-time (on appropriate types of course - e.g. dimension is known for xtensor but would be useless for xarray)? Thanks.

stellarpower avatar Dec 28 '22 19:12 stellarpower

There is xtensor_fixed in which the shape is fully specified at compile-time. For the other containers the shape is only known at runtime (though xtensor's dimension is specified at compile-time). I don't think the library has any hybrid containers with one dimension templated and another not.

tdegeus avatar Dec 29 '22 08:12 tdegeus