pydata / pydata/xarray

Documentation error for DataArray.pad

Open Beginner friendly
#11,373 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs triage
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

What happened?

The documentation for DataArray.pad says that the default value for constant_values is zero. But in the source the default value is None -- this value is passed to Dataset.pad, which converts it to nan, as described in the documentation for Dataset.pad.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked DataArray.pad documentation and the DataArray.pad source or docstring mentioned in the report. Compare its constant_values description with Dataset.pad, then correct the documented default so it matches the implementation and resulting nan behavior. Verify that the generated DataArray.pad documentation reflects the corrected wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.