Skip to content

Commit

Permalink
MAINT: fixed several PYTHONOPTIMIZE=2 failures
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Apr 30, 2019
1 parent 178a53f commit 995665e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions numpy/distutils/system_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -1603,21 +1603,21 @@ def _get_info_blas(self):
# Default to get the optimized BLAS implementation
info = get_info('blas_opt')
if not info:
warnings.warn(BlasNotFoundError.__doc__, stacklevel=3)
warnings.warn(BlasNotFoundError.__doc__ or '', stacklevel=3)
info_src = get_info('blas_src')
if not info_src:
warnings.warn(BlasSrcNotFoundError.__doc__, stacklevel=3)
warnings.warn(BlasSrcNotFoundError.__doc__ or '', stacklevel=3)
return {}
dict_append(info, libraries=[('fblas_src', info_src)])
return info

def _get_info_lapack(self):
info = get_info('lapack')
if not info:
warnings.warn(LapackNotFoundError.__doc__, stacklevel=3)
warnings.warn(LapackNotFoundError.__doc__ or '', stacklevel=3)
info_src = get_info('lapack_src')
if not info_src:
warnings.warn(LapackSrcNotFoundError.__doc__, stacklevel=3)
warnings.warn(LapackSrcNotFoundError.__doc__ or '', stacklevel=3)
return {}
dict_append(info, libraries=[('flapack_src', info_src)])
return info
Expand Down Expand Up @@ -1659,8 +1659,8 @@ def calc_info(self):
if 'lapack' not in lapack_order:
# Since the user may request *not* to use any library, we still need
# to raise warnings to signal missing packages!
warnings.warn(LapackNotFoundError.__doc__, stacklevel=2)
warnings.warn(LapackSrcNotFoundError.__doc__, stacklevel=2)
warnings.warn(LapackNotFoundError.__doc__ or '', stacklevel=2)
warnings.warn(LapackSrcNotFoundError.__doc__ or '', stacklevel=2)


class blas_opt_info(system_info):
Expand Down Expand Up @@ -1721,11 +1721,11 @@ def _calc_info_blas(self):
dict_append(info, **blas)
else:
# Not even BLAS was found!
warnings.warn(BlasNotFoundError.__doc__, stacklevel=3)
warnings.warn(BlasNotFoundError.__doc__ or '', stacklevel=3)

blas_src = get_info('blas_src')
if not blas_src:
warnings.warn(BlasSrcNotFoundError.__doc__, stacklevel=3)
warnings.warn(BlasSrcNotFoundError.__doc__ or '', stacklevel=3)
return False
dict_append(info, libraries=[('fblas_src', blas_src)])

Expand Down Expand Up @@ -1757,8 +1757,8 @@ def calc_info(self):
if 'blas' not in blas_order:
# Since the user may request *not* to use any library, we still need
# to raise warnings to signal missing packages!
warnings.warn(BlasNotFoundError.__doc__, stacklevel=2)
warnings.warn(BlasSrcNotFoundError.__doc__, stacklevel=2)
warnings.warn(BlasNotFoundError.__doc__ or '', stacklevel=2)
warnings.warn(BlasSrcNotFoundError.__doc__ or '', stacklevel=2)


class blas_info(system_info):
Expand Down

0 comments on commit 995665e

Please sign in to comment.