Skip to content

Raise an error for zero increment grid#1484

Merged
weiji14 merged 12 commits intoGenericMappingTools:mainfrom
yohaimagen:upstream/raise_inalid_input_for_zero_inc_grid
Sep 12, 2021
Merged

Raise an error for zero increment grid#1484
weiji14 merged 12 commits intoGenericMappingTools:mainfrom
yohaimagen:upstream/raise_inalid_input_for_zero_inc_grid

Conversation

@yohaimagen
Copy link
Contributor

@yohaimagen yohaimagen commented Sep 4, 2021

Raise an error when DataArray has zero increment grid.

Fixes #1483

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@yohaimagen
Copy link
Contributor Author

/format

@yohaimagen yohaimagen self-assigned this Sep 7, 2021
@yohaimagen yohaimagen added the bug Something isn't working label Sep 7, 2021
Copy link
Member

@maxrjones maxrjones left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@maxrjones maxrjones added the final review call This PR requires final review and approval from a second reviewer label Sep 11, 2021
@seisman seisman changed the title add error for not monotonically increasing grid Raise an error for zero increment grid Sep 11, 2021
@seisman
Copy link
Member

seisman commented Sep 11, 2021

I changed the PR title to "Raise an error for zero increment grid" so that it better describes the changes in this PR. Feel free to improve the PR title yourself.

@seisman seisman added this to the 0.5.0 milestone Sep 11, 2021
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
yohaimagen and others added 4 commits September 12, 2021 07:40
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@yohaimagen
Copy link
Contributor Author

I think this one is ready to be merged into main, let me know if there is anything else still to be done over here.

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Thanks @yohaimagen! I'll merge this in now 😃

@weiji14 weiji14 merged commit b69fd0c into GenericMappingTools:main Sep 12, 2021
@weiji14 weiji14 removed the final review call This PR requires final review and approval from a second reviewer label Sep 12, 2021
@yohaimagen yohaimagen deleted the upstream/raise_inalid_input_for_zero_inc_grid branch September 14, 2021 08:58
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Raise GMTInvalidInput error when xarray.DataArray
grid input has zero increment coordinates to prevent
segmentation fault in the PyGMT clib API.

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segmentation fault if a grid has zero increments

5 participants