Skip to content

Transpose polysets#512

Merged
chrisrichardson merged 12 commits intomainfrom
chris/transpose
May 20, 2022
Merged

Transpose polysets#512
chrisrichardson merged 12 commits intomainfrom
chris/transpose

Conversation

@mscroggs
Copy link
Member

Transpose the last two indices of polysets, so that xt::row is now used instead of xt::col

Fixes #395.

// Normalise
for (std::size_t p = 0; p <= n; ++p)
xt::view(P, xt::all(), xt::all(), p) *= std::sqrt(2 * p + 1);
xt::view(P, xt::all(), p, xt::all()) *= std::sqrt(2 * p + 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not big fan of xtensor's broadcasting.
Shall we use plain loops instead? Maybe in a different PR?

@chrisrichardson chrisrichardson merged commit a25286b into main May 20, 2022
@chrisrichardson chrisrichardson deleted the chris/transpose branch May 20, 2022 19:16
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.

Transpose polysets

4 participants