[issue36879] bug with round() and "numpy floats"

2019-06-02 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> third party stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ _

[issue36879] bug with round() and "numpy floats"

2019-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: BTW, there are various issues already open in the NumPy bug tracker, for example https://github.com/numpy/numpy/issues/11557 I propose closing this as "third party". -- ___ Python tracker

[issue36879] bug with round() and "numpy floats"

2019-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: > Maybe we should add something in the docs regarding the no-restriction point. IMO, the docs are clear enough (and also long enough) already here. Just as with most other magic methods, classes from third-party packages can return whatever they like. It doe

[issue36879] bug with round() and "numpy floats"

2019-05-11 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36879] bug with round() and "numpy floats"

2019-05-10 Thread SilentGhost
Change by SilentGhost : -- resolution: not a bug -> stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36879] bug with round() and "numpy floats"

2019-05-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- assignee: -> docs@python components: +Documentation nosy: +docs@python resolution: -> not a bug versions: +Python 3.7, Python 3.8 ___ Python tracker

[issue36879] bug with round() and "numpy floats"

2019-05-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: round() delegates to class.__round__, so what's happening here is that numpy's float implements __round__ in a way it returns a float. There is no restriction on what the class can return: >>> class A: ... def __round__(self): ... return "

[issue36879] bug with round() and "numpy floats"

2019-05-10 Thread Scaler
New submission from Scaler : round()'s documentation (https://docs.python.org/3/library/functions.html#round) says that "The return value is an integer if ndigits is omitted or None." Works well with "built-in floats", but not with "numpy floats" (didn't know they were different): >>> import