DOC: Add docstrings for some scalar types#17521
Conversation
numpy/core/_add_newdocs_scalars.py
Outdated
| r""" | ||
| A byte string. | ||
|
|
||
| When used in array, this type cannot contain trailing nulls. |
There was a problem hiding this comment.
I'm trying to avoid describing the awkwardness that is #15477 here...
numpy/core/_add_newdocs_scalars.py
Outdated
| Any Python object. | ||
| """) | ||
|
|
||
| add_newdoc_for_scalar_type('str_', ['str0', 'unicode_'], |
There was a problem hiding this comment.
It's tempting to just not mention these str0 etc types. No one should be using them, and documenting them might just encourage people.
| Either an opaque sequence of bytes, or a structure. | ||
|
|
||
| >>> np.void(b'abcd') | ||
| void(b'\x61\x62\x63\x64') |
There was a problem hiding this comment.
Thanks - fixed with a raw-string, I think
|
Somehow this caused a segfault... I've restarted the test to see if it was random... |
Hmm, there was another segfault not too long ago, I don't recall the details, but it also went away on second try. Worth noting. |
|
Unfortunately the act of restarting the build threw away the build log... |
|
Thanks Eric. Do you recall which test run segfaulted? |
|
Yes, it was this one before it was restarted: https://travis-ci.org/github/numpy/numpy/jobs/734723008 |
|
ISTR that the previous segfault was also in the |
Partially addresses #10106. Feel free to suggest and/or commit improvements.
https://16285-908607-gh.circle-artifacts.com/0/doc/build/html/reference/arrays.scalars.html?highlight=scalars#other-types