xtensor-stack / xtensor-r

R bindings for xtensor
BSD 3-Clause "New" or "Revised" License
86 stars 15 forks source link

add rank member to rtensor and rarray #136

Closed ThibHlln closed 1 year ago

ThibHlln commented 1 year ago

Hi,

I noticed that rtensor and rarray did not have a rank member such that

xt::get_rank<xt::rtensor<double, 2>>::value

returns SIZE_MAX instead of 2.

So this PR adds a rank member to these objects, taking inspiration from the one made for xtensor-python (https://github.com/xtensor-stack/xtensor-python/pull/241).

JohanMabille commented 1 year ago

The errors on the CI are not related to this PR. I'm gonna fix them in a separated PR, once it is merged you can rebase this one and everything should be green ;)

JohanMabille commented 1 year ago

Here you go.

ThibHlln commented 1 year ago

Thank you Johan. :-) I have now rebased my PR with your CI fix.

ThibHlln commented 1 year ago

Would it be possible to get a new tag/release including the new rank member please?

JohanMabille commented 1 year ago

sure!