Use consistently 1-D, 2-D, or 3-D (with hyphen and capitalized)#2252
Use consistently 1-D, 2-D, or 3-D (with hyphen and capitalized)#2252
Conversation
|
I'm not sure about these changes. It seems numpy prefers to use xD instead (e.g., see https://numpy.org/doc/stable/user/basics.creation.html#id1). |
Hm. I only looked on this numpy documentation page https://numpy.org/doc/stable/user/absolute_beginners.html#more-information-about-arrays. There they introduce the shortcuts with hyphen, but you are right later they use the shortcuts more often without hyphen 😂. |
|
Ping @GenericMappingTools/pygmt-maintainers to decide if we should use 2-D (consistent with GMT) or 2D (consistent with NumPy). |
I have no strong opinion on that, would be happy with both solutions as long as we have a consistent naming. |
Description of proposed changes
Corresponding to this upstream GMT PR GenericMappingTools/gmt#7157, this PR aims to use consistently
x-D(with hypen and capitalized, i.e., notxdorxD) for x=1,2,3.Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version