summaryrefslogtreecommitdiff
path: root/numpy/linalg/linalg.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-03-25 10:11:43 +0000
committerEric Wieser <wieser.eric@gmail.com>2017-03-25 10:36:28 +0000
commitb87fca27261f79be20ab06a222ed2330d60d9f2c (patch)
tree00907ad5fffa7d13f99b1cf60398c624063f807e /numpy/linalg/linalg.py
parenta2c4d3230d58a5c4569ab2c7f13bdf9499b71dd4 (diff)
downloadnumpy-b87fca27261f79be20ab06a222ed2330d60d9f2c.tar.gz
MAINT: Remove asbytes where a b prefix would suffice
Since we only need to support python 2, we can remove any case where we just pass a single string literal and use the b prefix instead. What we can't do is transform asbytes("tests %d" % num), because %-formatting fails on bytes in python 3.x < 3.5.
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r--numpy/linalg/linalg.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py
index f43b06617..e5623ad97 100644
--- a/numpy/linalg/linalg.py
+++ b/numpy/linalg/linalg.py
@@ -29,14 +29,13 @@ from numpy.core.multiarray import normalize_axis_index
from numpy.lib import triu, asfarray
from numpy.linalg import lapack_lite, _umath_linalg
from numpy.matrixlib.defmatrix import matrix_power
-from numpy.compat import asbytes
# For Python2/3 compatibility
-_N = asbytes('N')
-_V = asbytes('V')
-_A = asbytes('A')
-_S = asbytes('S')
-_L = asbytes('L')
+_N = b'N'
+_V = b'V'
+_A = b'A'
+_S = b'S'
+_L = b'L'
fortran_int = intc