diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 362e73431501386733fab77bcc8f8984532b4bd5..755fed9fc8d6d2d6796641636d4ffd026676a580 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -71,8 +71,8 @@ test:centos7.3:
              -DZLIB_INCLUDE_DIR=$EBROOTZLIB/include
              -DZLIB_LIBRARY=$EBROOTZLIB/lib/libz.so
              -DOPTIMIZE=1
-             -DCMAKE_C_FLAGS='-Wno-unused-local-typedefs -L/scicore/soft/apps/libpng/1.6.34-GCCcore-7.3.0/lib/ -L/scicore/soft/apps/LibTIFF/4.0.9-GCCcore-7.3.0/lib/ -L/scicore/soft/apps/zlib/1.2.11-GCCcore-7.3.0/lib/ -isystem ${EBROOTBOOST}/include -isystem ${EBROOTOPENMM}/include'
-             -DCMAKE_CXX_FLAGS='-Wno-unused-local-typedefs -L/scicore/soft/apps/libpng/1.6.34-GCCcore-7.3.0/lib/ -L/scicore/soft/apps/LibTIFF/4.0.9-GCCcore-7.3.0/lib/ -L/scicore/soft/apps/zlib/1.2.11-GCCcore-7.3.0/lib/ -isystem ${EBROOTBOOST}/include -isystem ${EBROOTOPENMM}/include' 
+             -DCMAKE_C_FLAGS='-L/scicore/soft/apps/libpng/1.6.34-GCCcore-7.3.0/lib/ -L/scicore/soft/apps/LibTIFF/4.0.9-GCCcore-7.3.0/lib/ -L/scicore/soft/apps/zlib/1.2.11-GCCcore-7.3.0/lib/ -isystem ${EBROOTBOOST}/include -isystem ${EBROOTOPENMM}/include'
+             -DCMAKE_CXX_FLAGS='-L/scicore/soft/apps/libpng/1.6.34-GCCcore-7.3.0/lib/ -L/scicore/soft/apps/LibTIFF/4.0.9-GCCcore-7.3.0/lib/ -L/scicore/soft/apps/zlib/1.2.11-GCCcore-7.3.0/lib/ -isystem ${EBROOTBOOST}/include -isystem ${EBROOTOPENMM}/include' 
              -DCMAKE_EXE_LINKER_FLAGS=" -pthread"
   - make -j 2
   - echo "    ... done building OST."
diff --git a/modules/base/pymod/table.py b/modules/base/pymod/table.py
index 8697d63d08eb8e6f3101002a2973663981a99675..4277edf949edaab289882cf9bd2cd9b66dc915bb 100644
--- a/modules/base/pymod/table.py
+++ b/modules/base/pymod/table.py
@@ -2348,16 +2348,19 @@ Statistics for column %(col)s
     if file_opened:
       stream.close()
 
-     
-  def GetNumpyMatrix(self, *args):
+  def GetNumpyMatrixAsArray(self, *args):
     '''
-    Returns a numpy matrix containing the selected columns from the table as 
-    columns in the matrix.
+    Returns a numpy array containing the selected columns from the table as 
+    columns as a matrix.
 
     Only columns of type *int* or *float* are supported. *NA* values in the
     table will be converted to *None* values.
 
-    :param \*args: column names to include in numpy matrix
+    Originally the function used the numpy matrix class but that is going to be
+    deprecated in the future. Numpy itself suggests replacing numpy matrix by
+    numpy array.
+
+    :param \*args: column names to include in numpy array
 
     :warning: The function depends on *numpy*
     '''
@@ -2372,16 +2375,40 @@ Statistics for column %(col)s
         idx = self.GetColIndex(arg)
         col_type = self.col_types[idx]
         if col_type!='int' and col_type!='float':
-          raise TypeError("Numpy matrix can only be generated from numeric column types")
+          raise TypeError("Numpy matrix can only be generated from numeric "+\
+                          "column types")
         idxs.append(idx)
-      m = np.matrix([list(self[i]) for i in idxs]) 
-      return m.T
+
+      a = np.array([list(self[i]) for i in idxs])
+      return a.T
     
     except ImportError:
       LogError("Function needs numpy, but I could not import it.")
       raise
-    
 
+  def GetNumpyMatrix(self, *args):
+    '''
+    *Caution*: Numpy is deprecating the use of the numpy matrix class.
+
+    Returns a numpy matrix containing the selected columns from the table as 
+    columns in the matrix.
+
+    Only columns of type *int* or *float* are supported. *NA* values in the
+    table will be converted to *None* values.
+
+    :param \*args: column names to include in numpy matrix
+
+    :warning: The function depends on *numpy*
+    '''
+    LogWarning("table.GetNumpyMatrix is deprecated, please use "+
+               "table.GetNumpyMatrixAsArray instead")
+    try:
+      import numpy as np
+      m = self.GetNumpyMatrixAsArray(*args)
+      return np.matrix(m)
+    except ImportError:
+      LogError("Function needs numpy, but I could not import it.")
+      raise
 
   def GaussianSmooth(self, col, std=1.0, na_value=0.0, padding='reflect', c=0.0):
 
@@ -2502,20 +2529,20 @@ Statistics for column %(col)s
       if len(args)==0:
         raise RuntimeError("At least one column must be specified.")
       
-      b = self.GetNumpyMatrix(ref_col)
-      a = self.GetNumpyMatrix(*args)
-      
+      b = self.GetNumpyMatrixAsArray(ref_col)
+      a = self.GetNumpyMatrixAsArray(*args)
+
       if len(kwargs)!=0:
         if 'weights' in kwargs:
-          w = self.GetNumpyMatrix(kwargs['weights'])
+          w = self.GetNumpyMatrixAsArray(kwargs['weights'])
           b = np.multiply(b,w)
           a = np.multiply(a,w)
           
         else:
           raise RuntimeError("specified unrecognized kwargs, use weights as key")
       
-      k = (a.T*a).I*a.T*b
-      return list(np.array(k.T).reshape(-1))
+      k = np.linalg.inv(a.T@a)@a.T@b
+      return list(k.T.reshape(-1))
     
     except ImportError:
       LogError("Function needs numpy, but I could not import it.")
@@ -3202,3 +3229,5 @@ def Merge(table1, table2, by, only_matching=False):
       new_tab.AddRow(row)
   return new_tab
 
+
+#  LocalWords:  numpy Numpy
diff --git a/modules/base/tests/test_table.py b/modules/base/tests/test_table.py
index 5d56f67ee49732ce6f875ecfc169908162d81d5f..52dee4de4d2dea7aba14fea4f299047156c7f0d6 100644
--- a/modules/base/tests/test_table.py
+++ b/modules/base/tests/test_table.py
@@ -1472,7 +1472,7 @@ class TestTable(unittest.TestCase):
     mcc = tab.ComputeMCC(score_col='prediction2', class_col='reference')
     self.assertAlmostEqual(mcc, 0.882089673321)
 
-  def testTableAsNumpyMatrix(self):
+  def testTableAsNumpyMatrixAsArray(self):
     if not HAS_NUMPY:
       return
 
@@ -1488,24 +1488,24 @@ class TestTable(unittest.TestCase):
     
     tab = self.CreateTestTable()
     tab.AddCol('fourth','b',[True, False, False])
-    m = tab.GetNumpyMatrix('second')
-    mc = np.matrix([[3],[None],[9]])
+    m = tab.GetNumpyMatrixAsArray('second')
+    mc = np.array([[3],[None],[9]])
     self.assertTrue(np.all(m==mc))
-    mc = np.matrix([[3],[None],[10]])
+    mc = np.array([[3],[None],[10]])
     self.assertFalse(np.all(m==mc))
-    m = tab.GetNumpyMatrix('third')
-    mc = np.matrix([[None],[2.200],[3.300]])
+    m = tab.GetNumpyMatrixAsArray('third')
+    mc = np.array([[None],[2.200],[3.300]])
     self.assertTrue(np.all(m==mc))
-    m = tab.GetNumpyMatrix('second','third')
-    mc = np.matrix([[3, None],[None, 2.200],[9, 3.300]])
+    m = tab.GetNumpyMatrixAsArray('second','third')
+    mc = np.array([[3, None],[None, 2.200],[9, 3.300]])
     self.assertTrue(np.all(m==mc))
-    m = tab.GetNumpyMatrix('third','second')
-    mc = np.matrix([[None, 3],[2.200, None],[3.300, 9]])
+    m = tab.GetNumpyMatrixAsArray('third','second')
+    mc = np.array([[None, 3],[2.200, None],[3.300, 9]])
     self.assertTrue(np.all(m==mc))
 
-    self.assertRaises(TypeError, tab.GetNumpyMatrix, 'fourth')
-    self.assertRaises(TypeError, tab.GetNumpyMatrix, 'first')
-    self.assertRaises(RuntimeError, tab.GetNumpyMatrix)
+    self.assertRaises(TypeError, tab.GetNumpyMatrixAsArray, 'fourth')
+    self.assertRaises(TypeError, tab.GetNumpyMatrixAsArray, 'first')
+    self.assertRaises(RuntimeError, tab.GetNumpyMatrixAsArray)
     
   def testOptimalPrefactors(self):
     if not HAS_NUMPY:
diff --git a/modules/bindings/pymod/hhblits.py b/modules/bindings/pymod/hhblits.py
index 5567dd2296f9c9819d610bb18558668c878f8a14..ff08319a4319cc562f6182df296ed20b7b92fe8b 100644
--- a/modules/bindings/pymod/hhblits.py
+++ b/modules/bindings/pymod/hhblits.py
@@ -624,8 +624,17 @@ class HHblits:
             return hhm_file
         ost.LogVerbose('converting %s to %s' % (a3m_file, hhm_file))
         os.putenv('HHLIB', self.hhlib_dir)
-        if subprocess.call('%s -i %s -o %s' % (hhmake, a3m_file, hhm_file),
-                           shell=True):
+        job = subprocess.Popen('%s -i %s -o %s' % (hhmake, a3m_file, hhm_file),
+                               shell=True, stdout=subprocess.PIPE,
+                               stderr=subprocess.PIPE)
+        sout, serr = job.communicate()
+        lines = serr.decode().splitlines()
+        for line in lines:
+            ost.LogWarning(line)
+        lines = sout.decode().splitlines()
+        for line in lines:
+            ost.LogVerbose(line)
+        if job.returncode !=0:
             raise IOError('could not convert a3m to hhm file')
         return hhm_file
 
diff --git a/modules/bindings/src/tmalign/TMalign.h b/modules/bindings/src/tmalign/TMalign.h
index 79abc61af1f744ae16032b5a42f1d83bee2ee63c..08caeec3a2b97f6cdb49a1a7d22b660b2c60b2eb 100644
--- a/modules/bindings/src/tmalign/TMalign.h
+++ b/modules/bindings/src/tmalign/TMalign.h
@@ -794,7 +794,7 @@ bool overlap(const int a1,const int b1,const int c1,const int d1,
 void sec_str(int len,char *seq, const vector<vector<bool> >&bp, 
     int a, int b,int &c, int &d)
 {
-    int i,j;
+    int i;
     
     for (i=0;i<len;i++)
     {
@@ -811,8 +811,8 @@ void sec_str(int len,char *seq, const vector<vector<bool> >&bp,
  * 1->unpair, 2->paired with upstream, 3->paired with downstream */
 void make_sec(char *seq, double **x, int len, int *sec,const string atom_opt)
 {
-    int ii,jj,i,j;
-
+    int ii,jj,j;
+    unsigned int i;
     float lb=12.5; // lower bound for " C3'"
     float ub=15.0; // upper bound for " C3'"
     if     (atom_opt==" C4'") {lb=14.0;ub=16.0;}
@@ -825,7 +825,7 @@ void make_sec(char *seq, double **x, int len, int *sec,const string atom_opt)
     vector<bool> bp_tmp(len,false);
     vector<vector<bool> > bp(len,bp_tmp);
     bp_tmp.clear();
-    for (i=0; i<len; i++)
+    for (i=0;(int) i<len; i++)
     {
         sec[i]=1;
         for (j=i+1; j<len; j++)
@@ -843,7 +843,7 @@ void make_sec(char *seq, double **x, int len, int *sec,const string atom_opt)
     
     // From 5' to 3': A0 C0 D0 B0: A0 paired to B0, C0 paired to D0
     vector<int> A0,B0,C0,D0;
-    for (i=0; i<len-2; i++)
+    for (i=0;(int) i<len-2; i++)
     {
         for (j=i+3; j<len; j++)
         {
@@ -858,8 +858,8 @@ void make_sec(char *seq, double **x, int len, int *sec,const string atom_opt)
         }
     }
     
-    int sign;
-    for (i=0;i<A0.size();i++)
+    //int sign;
+    for (i=0; i<A0.size();i++)
     {
         /*
         sign=0;
@@ -1483,8 +1483,8 @@ void output_superpose(const string filename, const char *fname_super,
     double x1[3]; // after transform
 
     /* for PDBx/mmCIF only */
-    map<string,int> _atom_site;
-    int atom_site_pos;
+    map<string,unsigned int> _atom_site;
+    unsigned int atom_site_pos;
     vector<string> line_vec;
 
     while (compress_type?fin_gz.good():fin.good())
@@ -1545,7 +1545,7 @@ void output_superpose(const string filename, const char *fname_super,
                 transform(t, u, x, x1);
 
                 for (atom_site_pos=0; atom_site_pos<_atom_site.size(); atom_site_pos++)
-                {
+                { 
                     if (atom_site_pos==_atom_site["Cartn_x"])
                         buf<<setiosflags(ios::fixed)<<setprecision(3)
                            <<setw(8)<<x1[0]<<' ';
@@ -2324,7 +2324,6 @@ int TMalign_main(double **xa, double **ya,
     TM2 = TMscore8_search(r1, r2, xtm, ytm, xt, n_ali8, t, u, simplify_step,
         score_sum_method, &rmsd, local_d0_search, Lnorm, score_d8, d0);
 
-    double Lnorm_d0;
     if (a_opt>0)
     {
         //normalized by average length of structures A, B
@@ -2360,7 +2359,6 @@ int TMalign_main(double **xa, double **ya,
         d0_out=d0_scale;
         d0_0=d0_scale;
         //Lnorm_0=ylen;
-        Lnorm_d0=Lnorm_0;
         local_d0_search = d0_search;
         TM5 = TMscore8_search(r1, r2, xtm, ytm, xt, n_ali8, t0, u0,
             simplify_step, score_sum_method, &rmsd, local_d0_search, Lnorm,
diff --git a/modules/bindings/src/tmalign/basic_fun.h b/modules/bindings/src/tmalign/basic_fun.h
index 8274428ee8d56b061180855f6205df214ed32e49..3dadccc30faf0dde5403b9adc123d2cf376bb867 100644
--- a/modules/bindings/src/tmalign/basic_fun.h
+++ b/modules/bindings/src/tmalign/basic_fun.h
@@ -124,7 +124,7 @@ void split(const string &line, vector<string> &line_vec,
     const char delimiter=' ')
 {
     bool within_word = false;
-    for (int pos=0;pos<line.size();pos++)
+    for (unsigned int pos=0;pos<line.size();pos++)
     {
         if (line[pos]==delimiter)
         {
@@ -276,7 +276,7 @@ size_t get_PDB_lines(const string filename,
             chainID_list.push_back(i8_stream.str());
             PDB_lines.push_back(tmp_str_vec);
             mol_vec.push_back(0);
-            for (i=0;i<L;i++)
+            for (i=0;(int) i<L;i++)
             {
                 if (compress_type) fin_gz>>x>>y>>z;
                 else               fin   >>x>>y>>z;
@@ -294,7 +294,6 @@ size_t get_PDB_lines(const string filename,
     else if (infmt_opt==2) // xyz format
     {
         int L=0;
-        char A;
         stringstream i8_stream;
         while (compress_type?fin_gz.good():fin.good())
         {
@@ -309,7 +308,7 @@ size_t get_PDB_lines(const string filename,
             chainID_list.push_back(':'+line.substr(0,i));
             PDB_lines.push_back(tmp_str_vec);
             mol_vec.push_back(0);
-            for (i=0;i<L;i++)
+            for (i=0;(int) i<L;i++)
             {
                 if (compress_type) getline(fin_gz, line);
                 else               getline(fin, line);
@@ -511,7 +510,7 @@ size_t get_FASTA_lines(const string filename,
 {
     string line;
     vector<string> tmp_str_vec;
-    int l;
+    unsigned int l;
     
     int compress_type=0; // uncompressed file
     ifstream fin;
@@ -640,7 +639,7 @@ int extract_aln_from_resi(vector<string> &sequence, char *seqx, char *seqy,
 int read_PDB(const vector<string> &PDB_lines, double **a, char *seq,
     vector<string> &resi_vec, const int byresi_opt)
 {
-    int i;
+    unsigned int i;
     for (i=0;i<PDB_lines.size();i++)
     {
         a[i][0] = atof(PDB_lines[i].substr(30, 8).c_str());
@@ -733,7 +732,7 @@ void read_user_alignment(vector<string>&sequence, const string &fname_lign,
     if (I_opt)
     {
         int aligned_resNum=0;
-        for (int i=0;i<sequence[0].size();i++) 
+        for (unsigned int i=0;i<sequence[0].size();i++) 
             aligned_resNum+=(sequence[0][i]!='-' && sequence[1][i]!='-');
         if (aligned_resNum<3)
             PrintErrorAndQuit("ERROR! Superposition is undefined for <3 aligned residues.");
diff --git a/modules/bindings/tests/test_hhblits.py b/modules/bindings/tests/test_hhblits.py
index 1bc6b3652dee18736ffc03050862483c262726ad..7e0e3a7fcea983290755ac531812cc40f6c9d7ef 100644
--- a/modules/bindings/tests/test_hhblits.py
+++ b/modules/bindings/tests/test_hhblits.py
@@ -13,6 +13,24 @@ import ost
 from ost import seq
 from ost.bindings import hhblits
 
+class _UnitTestHHblitsLog(ost.LogSink):
+  """Dedicated logger to hide some expected warning/ error messages.
+  """
+  def __init__(self):
+    ost.LogSink.__init__(self)
+    self.lcwd = os.getcwd()
+
+  def LogMessage(self, message, severity):
+    message = message.strip()
+    dnem = "could not open file '%s'" % os.path.join(self.lcwd,
+                                                     'doesnotexist.a3m')
+    if message.endswith(dnem):
+        return
+    print(message)
+
+def setUpModule():
+  ost.PushLogSink(_UnitTestHHblitsLog())
+
 class TestHHblitsBindings(unittest.TestCase):
     def setUp(self):
         self.hhroot = os.getenv('EBROOTHHMINSUITE')
diff --git a/modules/mol/alg/pymod/qsscoring.py b/modules/mol/alg/pymod/qsscoring.py
index f9753788cd61345fdb524bc2e2794c660d27caa6..fa838faabb18405849f0d0dc55110716c4c077b0 100644
--- a/modules/mol/alg/pymod/qsscoring.py
+++ b/modules/mol/alg/pymod/qsscoring.py
@@ -1618,7 +1618,7 @@ def _GetAngles(Rt):
   :type Rt:  :class:`ost.geom.Mat4`
   :return: A :class:`tuple` of angles for each axis (x,y,z)
   """
-  rot = np.asmatrix(Rt.ExtractRotation().data).reshape(3,3)
+  rot = np.asarray(Rt.ExtractRotation().data).reshape(3,3)
   tx = np.arctan2(rot[2,1], rot[2,2])
   if tx < 0:
     tx += 2*np.pi
diff --git a/modules/mol/base/pymod/export_editors.cc b/modules/mol/base/pymod/export_editors.cc
index 50aa168421cc0a2eb8db8d5e76e3aa01c86cb0ac..ebdbcf2b23e3f3a0aca1840047bec615adfbf3c0 100644
--- a/modules/mol/base/pymod/export_editors.cc
+++ b/modules/mol/base/pymod/export_editors.cc
@@ -29,7 +29,15 @@ using namespace boost::python;
 using namespace ost;
 using namespace ost::mol;
 
+/* Including NumPy headers produces compiler warnings. The ones about "Using
+   deprecated NumPy API..." we can not get rid of. The highest NumPy version we
+   support is 1.6 while the non-deprecated API starts with version 1.7.
+   Also see the comment in modules/gfx/pymod/export_primlist.cc for further
+   information.
+*/
 #if OST_NUMPY_SUPPORT_ENABLED
+#include <numpy/numpyconfig.h>
+#define NPY_NO_DEPRECATED_API NPY_1_6_API_VERSION
 #include <numpy/arrayobject.h>
 #endif
 
@@ -228,6 +236,7 @@ void export_Editors()
 {
 #if OST_NUMPY_SUPPORT_ENABLED
   // The following define enforces no return value when calling import_array
+  #undef NUMPY_IMPORT_ARRAY_RETVAL
   #define NUMPY_IMPORT_ARRAY_RETVAL
   import_array();
 #endif