Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs for polynomial nodes #6

Open
jinglunyao opened this issue Jul 21, 2017 · 1 comment
Open

Bugs for polynomial nodes #6

jinglunyao opened this issue Jul 21, 2017 · 1 comment

Comments

@jinglunyao
Copy link

Hello,

I have tried to used the code for my database and it seems to me that there is an error relating to nodes of polynomials.

    U, W = polynoms.getNodesAndWeights(
        ot.Indices([legendre_quadrature_order] * dimension * 2))

would create nodes U independent of the domain of definition. Thus

    X = np.repeat(scale, 2) * U + np.repeat(shift, 2)

would create X which exceed the domain of definition. In consequence, we would get nan for matrix C.

Could you please try to fix this problem? Thank you in advance.

@jinglunyao
Copy link
Author

Hello,

I think we should replace

X = np.repeat(scale, 2) * U + np.repeat(shift, 2)

by

    X = np.array(list(scale)* 2) * U + np.array(list(shift)*2)

Please check it this is correct.

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

No branches or pull requests

1 participant