Skip to content

Conversation

ev-br
Copy link
Contributor

@ev-br ev-br commented May 22, 2022

Consider

$ python runtests.py -s numpy.lib.recfunctions --refguide-check -v

Previously, the -v switch was silently ignored.

With this PR, the output is

$ python runtests.py -s numpy.lib.recfunctions --refguide-check -v

<snip>

numpy.lib.recfunctions.unstructured_to_structured
-------------------------------------------------

Trying:
    from numpy.lib import recfunctions as rfn
Expecting nothing

ok
Trying:
    dt = np.dtype([('a', 'i4'), ('b', 'f4,u2'), ('c', 'f4', 2)])
Expecting nothing
ok
Trying:
    a = np.arange(20).reshape((4,5))
Expecting nothing
ok
Trying:
    a
Expecting:
    array([[ 0,  1,  2,  3,  4],
           [ 5,  6,  7,  8,  9],
           [10, 11, 12, 13, 14],
           [15, 16, 17, 18, 19]])
ok
Trying:
    rfn.unstructured_to_structured(a, dt)
Expecting:
    array([( 0, ( 1.,  2), [ 3.,  4.]), ( 5, ( 6.,  7), [ 8.,  9.]),
           (10, (11., 12), [13., 14.]), (15, (16., 17), [18., 19.])],
          dtype=[('a', '<i4'), ('b', [('f0', '<f4'), ('f1', '<u2')]), ('c', '<f4', (2,))])
ok

which might be a tad too noisy for some tastes. I'd suggest to treat this as a bugfix and consider various levels of verbosity between above and the default dots ..... as a separate enhancement.

$ python runtests.py -s numpy.lib.recfunctions --refguide-check -v

Previously, the `-v` switch was silently ignored.
@mattip mattip merged commit 8337d7d into numpy:main May 23, 2022
@mattip
Copy link
Member

mattip commented May 23, 2022

Thanks @ev-br

ev-br added a commit to ev-br/scipy that referenced this pull request May 23, 2022
This syncs numpy/numpy#21574

$ python runtests.py -s numpy.lib.recfunctions --refguide-check -v

Previously, the `-v` switch was silently ignored.
stefanv pushed a commit to scientific-python/spin that referenced this pull request Oct 4, 2022
This syncs numpy/numpy#21574

$ python runtests.py -s numpy.lib.recfunctions --refguide-check -v

Previously, the `-v` switch was silently ignored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants