Skip to content

legacy 1.13 printing edge case: missing superfluous comma after ellipsis #10059

Closed

Description

@lesteve

I think this is the last quirk that we found when running the scikit-learn doctests. After this one you will hopefully not hear from me for a while ;-). We have only one doctest affected by this and we can work around this easily by using repr instead of print or using doctest ellipsis.

This edge case does break the legacy='1.13' promise so I thought I would let you know and then you can decide whether you want to fix it (i.e. match the buggy behaviour with legacy='1.13') or not. I would completely understand if you just decided to close this issue

import numpy as np

try:
    np.set_printoptions(legacy='1.13')
except TypeError:
    pass

print(np.arange(10000))

Output numpy dev:

[   0    1    2 ... 9997 9998 9999]

Ouput on 1.13.3 (note the additional comma after the ellipsis):

[   0    1    2 ..., 9997 9998 9999]

Activity

  1. eric-wieser commented on Nov 20, 2017

    @eric-wieser
    Member

    Yep, this was issue #9777/PR #9815, which was before we settled on the legacy API, I think.

    It's pretty straightforward to fix this, so I'm inclined to say we should, even if it was a bugfix.

  2. added this to the milestone on Nov 20, 2017
  3. charris commented on Nov 27, 2017

    @charris
    Member

    @ahaldane @eric-wieser Has this been fixed?

  4. eric-wieser commented on Nov 27, 2017

    @eric-wieser
    Member

    No, this is still outstanding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions