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

Numerical issues #13

Open
dli7319 opened this issue Apr 21, 2023 · 0 comments · May be fixed by #14
Open

Numerical issues #13

dli7319 opened this issue Apr 21, 2023 · 0 comments · May be fixed by #14

Comments

@dli7319
Copy link

dli7319 commented Apr 21, 2023

When I run generate_perlin_noise_2d((721, 1281), (7, 7), (True, True))
I get the following issue:
ValueError: operands could not be broadcast together with shapes (722,1281,2) (721,1281,2)

This can be fixed by enumerating the grid manually instead of using np.mgrid:

    grid = np.stack(np.meshgrid(
        np.arange(0, shape[1]) * res[1] / shape[1],
        np.arange(0, shape[0]) * res[0] / shape[0],
    )[::-1], axis=-1)
@dli7319 dli7319 linked a pull request Apr 21, 2023 that will close this issue
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 a pull request may close this issue.

1 participant