Skip to content

add rank member to rtensor and rarray#136

Merged
JohanMabille merged 1 commit into
xtensor-stack:masterfrom
ThibHlln:add-rank-member
Jan 4, 2023
Merged

add rank member to rtensor and rarray#136
JohanMabille merged 1 commit into
xtensor-stack:masterfrom
ThibHlln:add-rank-member

Conversation

@ThibHlln

@ThibHlln ThibHlln commented Jan 3, 2023

Copy link
Copy Markdown
Contributor

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 (xtensor-stack/xtensor-python#241).

@JohanMabille

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member

Here you go.

@ThibHlln

ThibHlln commented Jan 4, 2023

Copy link
Copy Markdown
Contributor Author

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

@JohanMabille JohanMabille merged commit 3f88fc3 into xtensor-stack:master Jan 4, 2023
@ThibHlln

ThibHlln commented Jan 4, 2023

Copy link
Copy Markdown
Contributor Author

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

@JohanMabille

Copy link
Copy Markdown
Member

sure!

@ThibHlln ThibHlln deleted the add-rank-member branch January 4, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants