Conversation
|
|
||
| Out = gmt_new_record (GMT, (n_cols) ? out : NULL, (cmode) == GMT_COL_FIX ? record : NULL); /* the two items */ | ||
|
|
||
| gmt_set_pad (API->GMT, 0); /* Not read pads to simplify operations */ |
There was a problem hiding this comment.
@joa-quim Do you see any side effects removing this line?
|
simplify operations does not seems a reason good enough. Specially when it has buggish side effects, so I would say we should remove it and see if there are any noticeable side effects. The pad is big annoyance for externals transfering grids in memory because it implies making a full copy of the array and for many operations, grdinfo for example, the pad is not necessary at all. In Julia I try to distinguish uses where pad is needed (projections, gradients, etc...) from others where it doesn't and in those case I set the pad to zero. |
|
No new failures and the original bug is fixed. Merging. |
How do I know if a module needs pad or not? |
|
Well, a little bit by reasoning + trial-error. Making a projected image needs pad but a linear one (-JX) does not. Shading needs pad because of the gradient. Also, when a module needs the pad and grid/image do not have it, an error is issued. |
|
Good to know. Will see how it works in PyGMT. |
Closes #8525.