amol- commented on pull request #11726:
URL: https://github.com/apache/arrow/pull/11726#issuecomment-1011168850


   > Well that's sort of the problem here; the numpydoc's having a hard time 
reading the human-readable text 😉 That being said, I think it's totally fine in 
the case of `list of`; that's something this was explicitly designed for 
according to this test: 
https://github.com/numpy/numpydoc/blob/main/numpydoc/tests/test_xref.py#L44
   > 
   
   Well, `list of` is frequently interpreted in a decent way, but the code 
seems to be written to mostly support containers in the form `list[str]`, 
`dict[str, int]` and so on by default... 
   See https://github.com/numpy/numpydoc/blob/main/numpydoc/xref.py#L26-L30 
`of` is not even listed as a divisor of text blocks 
https://github.com/numpy/numpydoc/blob/main/numpydoc/xref.py#L54-L57 and I 
think that in the end what's going on is that it splits on `' '` and by chance 
interprets the part before the space as one type and the part after the space 
as another type.
   
   > That's also the reason why I put the "values coercible to arrays" above 
with a TODO comment. That is needed in the ignore list for formatting the 
current docstrings as is, but I think we should rather use a fixed set of terms 
like "array-like" for this, and if needed have a more free-form explanation of 
what that means in the parameter description on the next line.
   
   Not that `array-like` is a recognised expression by numpy docs, but it means 
`numpy.array`. We might want to add a definition of `arrow-array` to have a 
similar thing for Arrow arrays.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to