Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve docstring for all_arrays
  • Loading branch information
bobleesj committed Dec 26, 2024
commit 5824250c02fca1e067598615b48418eb24a48504
4 changes: 2 additions & 2 deletions src/diffpy/utils/diffraction_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ def __rtruediv__(self, other):

@property
def all_arrays(self):
"""The array containing `xarray` values in q, d, tth, and `yarray`.
"""The 2D array containing `xarray` and `yarray` values.

Returns
-------
ndarray
The 2D matrix containing the `xarray` objects values and `yarray`.
The 2D array containing the `xarray` values in q, tth, d, and `yarray`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for lower cognitive load I would change to The shape(len(data), 4)2D array with columns containing theyarray(intensity) and thexarray values in q, tth, and d . so they appear in the docstring in the same order as in the array columns

Copy link
Copy Markdown
Contributor Author

@bobleesj bobleesj Dec 26, 2024

Choose a reason for hiding this comment

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

Yes, great! superb. The example and this docstring makes it super clear.


Examples
--------
Expand Down