Skip to content

Commit

Permalink
fix deprecation warning from pytest (#3354)
Browse files Browse the repository at this point in the history
gensim/matutils.py:22: DeprecationWarning: Please use `triu` from the `scipy.linalg` namespace, the `scipy.linalg.special_matrices` namespace is deprecated.
    from scipy.linalg.special_matrices import triu
  • Loading branch information
martino-vic authored Dec 3, 2022
1 parent c93eb0b commit b17e6af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gensim/matutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
import numpy as np
import scipy.sparse
from scipy.stats import entropy
import scipy.linalg
from scipy.linalg import get_blas_funcs, triu
from scipy.linalg.lapack import get_lapack_funcs
from scipy.linalg.special_matrices import triu
from scipy.special import psi # gamma function utils


Expand All @@ -42,7 +41,7 @@ def blas(name, ndarray):
BLAS function for the needed operation on the given data type.
"""
return scipy.linalg.get_blas_funcs((name,), (ndarray,))[0]
return get_blas_funcs((name,), (ndarray,))[0]


def argsort(x, topn=None, reverse=False):
Expand Down

0 comments on commit b17e6af

Please sign in to comment.