DataArray.diff dim argument should be optional as is in docstring
See original GitHub issueThe dosctring of DataArray.diff
lists the dim
arg as optional, but it isn’t. IMHO it should indeed be optional as it is quite convenient to apply diff
to 1D signals without specifying the dimension.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Documenting different argument possibilities on same function
So, you explicitly state what is optional as indicated, otherwise it would be understood as a mandatory argument.
Read more >Applying unvectorized functions with apply_ufunc - Xarray
We will iteratively build up the right set of arguments to apply_ufunc and ... exclude_dims : set, optional Core dimensions on the inputs...
Read more >What's New — xarray 0.11.0 documentation - PyData |
The autoclose argument to open_dataset and related functions has been ... Fixed DataArray.to_iris() failure while creating DimCoord by falling back to ...
Read more >Python functions and stateful objects - PySD - Read the Docs
DataArray ) – Input value. dim (list of strs (optional)) – Dimensions to apply the function over. If not given the function will...
Read more >Interactive — hvPlot 0.8.2 documentation
Dataset> Dimensions: (lat: 25, time: 2920, lon: 53) Coordinates: * lat (lat) ... We can supply both regular values, widgets and parameters as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m low confidence keener on a consistent API that doesn’t depend on the number of dimensions, rather than saving a kwarg, so would vote +0.1 on retaining the implementation and changing the docstring, such that it’s required to pass a dimension name even with one dimension.
These days I mostly use
.differentiate('coord')
anyways, so I’m also for updating the docstring.