diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2023-03-01 18:03:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-01 18:03:59 -0500 |
| commit | 331c20da7ae57e7703723b5fc6eb44ea2a51b4e8 (patch) | |
| tree | 54761e5269bd78a477cd4805d35867ffaa8400d6 /numpy/core/numeric.py | |
| parent | e82af03181c2733290c6cabe54d739d8953860aa (diff) | |
| parent | 10743b0bcfa0905b15ccadfe164cfdb57ad6cf6a (diff) | |
| download | numpy-331c20da7ae57e7703723b5fc6eb44ea2a51b4e8.tar.gz | |
Merge pull request #23302 from rgommers/depr-round-around
DEP: deprecate `np.round_`; add `round`/`min`/`max` to the docs
Diffstat (limited to 'numpy/core/numeric.py')
| -rw-r--r-- | numpy/core/numeric.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index fbb284696..1687e2dbf 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -4,6 +4,7 @@ import operator import sys import warnings import numbers +import builtins import numpy as np from . import multiarray @@ -2023,7 +2024,7 @@ def binary_repr(num, width=None): binary = bin(num)[2:] binwidth = len(binary) outwidth = (binwidth if width is None - else max(binwidth, width)) + else builtins.max(binwidth, width)) warn_if_insufficient(width, binwidth) return binary.zfill(outwidth) @@ -2043,7 +2044,7 @@ def binary_repr(num, width=None): binary = bin(twocomp)[2:] binwidth = len(binary) - outwidth = max(binwidth, width) + outwidth = builtins.max(binwidth, width) warn_if_insufficient(width, binwidth) return '1' * (outwidth - binwidth) + binary |
