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

ValueError at high Octaves & Lacunarity #8

Open
AyrtonB opened this issue Feb 12, 2021 · 1 comment
Open

ValueError at high Octaves & Lacunarity #8

AyrtonB opened this issue Feb 12, 2021 · 1 comment

Comments

@AyrtonB
Copy link

AyrtonB commented Feb 12, 2021

When using larger octaves and lacunarity (e.g. 2 & 3 respectively) the following error occurs in perlin2d

ValueError: operands could not be broadcast together with shapes (1024,1024,2) (1023,1023,2)

At the line

n00 = np.sum(np.dstack((grid[:,:,0] , grid[:,:,1] )) * g00, 2)

I believe this is because the delta tuple doesnt consider what happens when there's a remainder from shape/resolution

@AyrtonB
Copy link
Author

AyrtonB commented Feb 12, 2021

Have added a check for valid resolutions in #7

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