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

[Bug] MethodError when using tensorgrid(). #17

Closed
pmc4 opened this issue Jun 19, 2023 · 2 comments
Closed

[Bug] MethodError when using tensorgrid(). #17

pmc4 opened this issue Jun 19, 2023 · 2 comments
Labels

Comments

@pmc4
Copy link

pmc4 commented Jun 19, 2023

Hi,
I've just installed the package in a new 1.9 environment and tried using the function tensorgrid but it returns a MethodError. A minimal working example is

using SparseGrids, FastGaussQuadrature

Nt, Wt = tensorgrid(2, 4, gausslegendre)

which produces the following error

ERROR: MethodError: objects of type Vector{Vector{Float64}} are not callable
Use square brackets [] for indexing an Array.

If I instead use the sparsegrid method with the same syntax, everything's fine:

n,w = sparsegrid(2,4,gausslegendre)

produces the correct output.

I've dived a bit into the code and discovered that the code line where tensorW is defined raises the Error. I don't know what the correct output should be, so I couldn't discover much at the moment.

This issue also arises if using julia 1.7 or 1.5 in new environments. Note that I haven't tested every Julia version, I just chose those two.

Best regards,
pmc4

Ps.: Could you please add the bug label to the issue? The option is disabled for me.

@robertdj robertdj added the bug label Jun 20, 2023
@robertdj
Copy link
Owner

Hi

Thanks for reporting this. Let me see if I can look into this soon.

@robertdj
Copy link
Owner

Hello again.

I have pushed the branch tensor where tensorgrid works (for Julia 1.7 that is running on My Machine).

I haven't updated Julia locally in a while, so I will look into fixing the compat issues with packages and Julia before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants