We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deprecation warning for asmatrix
The usage of numpy asmatrix raises Deprecation Warnings in numpy 1.15.4:
PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
There are 5 occurences in pandapower/pf/dSbus_dV_pypower.py.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pandapower/pf/dSbus_dV_pypower.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 # Copyright 1996-2015 PSERC. All rights reserved.
4 # Use of this source code is governed by a BSD-style
5 # license that can be found in the LICENSE file.
6 
7 # Copyright (c) 2016-2018 by University of Kassel and Fraunhofer Institute for Energy Economics
8 # and Energy System Technology (IEE), Kassel. All rights reserved.
9 
10 
11 
12 """Computes partial derivatives of power injection w.r.t. voltage.
13 """
14 
15 from numpy import conj, diag, asmatrix, asarray, zeros
16 from scipy.sparse import issparse, csr_matrix as sparse
17 
18 
19 def dSbus_dV(Ybus, V):
20     """Computes partial derivatives of power injection w.r.t. voltage.
21     """
22 
23     if issparse(Ybus):
24         return dSbus_dV_sparse(Ybus, V)
25     else:
26         return dSbus_dV_dense(Ybus, V)
27 
28 
29 def dSbus_dV_sparse(Ybus, V):
30     Ibus = Ybus * V
31     ib = range(len(V))
32     diagV = sparse((V, (ib, ib)))
33     diagIbus = sparse((Ibus, (ib, ib)))
34     diagVnorm = sparse((V / abs(V), (ib, ib)))
35     dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm
36     dS_dVa = 1j * diagV * conj(diagIbus - Ybus * diagV)
37     return dS_dVm, dS_dVa
38 
39 
40 def dSbus_dV_dense(Ybus, V):
41     # standard code from Pypower (slower than above)
42     Ibus = Ybus * asmatrix(V).T
43 
44     diagV = asmatrix(diag(V))
45     diagIbus = asmatrix(diag(asarray(Ibus).flatten()))
46     diagVnorm = asmatrix(diag(V / abs(V)))
47 
48     dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm
49     dS_dVa = 1j * diagV * conj(diagIbus - Ybus * diagV)
50     return dS_dVm, dS_dVa
51
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pandapower/pf/dSbus_dV_pypower.py b/pandapower/pf/dSbus_dV_pypower.py
--- a/pandapower/pf/dSbus_dV_pypower.py
+++ b/pandapower/pf/dSbus_dV_pypower.py
@@ -12,7 +12,7 @@
 """Computes partial derivatives of power injection w.r.t. voltage.
 """
 
-from numpy import conj, diag, asmatrix, asarray, zeros
+from numpy import conj, diag, asarray
 from scipy.sparse import issparse, csr_matrix as sparse
 
 
@@ -39,11 +39,11 @@
 
 def dSbus_dV_dense(Ybus, V):
     # standard code from Pypower (slower than above)
-    Ibus = Ybus * asmatrix(V).T
+    Ibus = Ybus * asarray(V).T
 
-    diagV = asmatrix(diag(V))
-    diagIbus = asmatrix(diag(asarray(Ibus).flatten()))
-    diagVnorm = asmatrix(diag(V / abs(V)))
+    diagV = asarray(diag(V))
+    diagIbus = asarray(diag(asarray(Ibus).flatten()))
+    diagVnorm = asarray(diag(V / abs(V)))
 
     dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm
     dS_dVa = 1j * diagV * conj(diagIbus - Ybus * diagV)

{"golden_diff": "diff --git a/pandapower/pf/dSbus_dV_pypower.py b/pandapower/pf/dSbus_dV_pypower.py\n--- a/pandapower/pf/dSbus_dV_pypower.py\n+++ b/pandapower/pf/dSbus_dV_pypower.py\n@@ -12,7 +12,7 @@\n \"\"\"Computes partial derivatives of power injection w.r.t. voltage.\n \"\"\"\n \n-from numpy import conj, diag, asmatrix, asarray, zeros\n+from numpy import conj, diag, asarray\n from scipy.sparse import issparse, csr_matrix as sparse\n \n \n@@ -39,11 +39,11 @@\n \n def dSbus_dV_dense(Ybus, V):\n     # standard code from Pypower (slower than above)\n-    Ibus = Ybus * asmatrix(V).T\n+    Ibus = Ybus * asarray(V).T\n \n-    diagV = asmatrix(diag(V))\n-    diagIbus = asmatrix(diag(asarray(Ibus).flatten()))\n-    diagVnorm = asmatrix(diag(V / abs(V)))\n+    diagV = asarray(diag(V))\n+    diagIbus = asarray(diag(asarray(Ibus).flatten()))\n+    diagVnorm = asarray(diag(V / abs(V)))\n \n     dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm\n     dS_dVa = 1j * diagV * conj(diagIbus - Ybus * diagV)\n", "issue": "Deprecation warning for asmatrix\nThe usage of numpy asmatrix raises Deprecation Warnings in numpy 1.15.4:\r\nPendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.\r\nThere are 5 occurences in pandapower/pf/dSbus_dV_pypower.py.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright 1996-2015 PSERC. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\n# Copyright (c) 2016-2018 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\n\n\"\"\"Computes partial derivatives of power injection w.r.t. voltage.\n\"\"\"\n\nfrom numpy import conj, diag, asmatrix, asarray, zeros\nfrom scipy.sparse import issparse, csr_matrix as sparse\n\n\ndef dSbus_dV(Ybus, V):\n    \"\"\"Computes partial derivatives of power injection w.r.t. voltage.\n    \"\"\"\n\n    if issparse(Ybus):\n        return dSbus_dV_sparse(Ybus, V)\n    else:\n        return dSbus_dV_dense(Ybus, V)\n\n\ndef dSbus_dV_sparse(Ybus, V):\n    Ibus = Ybus * V\n    ib = range(len(V))\n    diagV = sparse((V, (ib, ib)))\n    diagIbus = sparse((Ibus, (ib, ib)))\n    diagVnorm = sparse((V / abs(V), (ib, ib)))\n    dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm\n    dS_dVa = 1j * diagV * conj(diagIbus - Ybus * diagV)\n    return dS_dVm, dS_dVa\n\n\ndef dSbus_dV_dense(Ybus, V):\n    # standard code from Pypower (slower than above)\n    Ibus = Ybus * asmatrix(V).T\n\n    diagV = asmatrix(diag(V))\n    diagIbus = asmatrix(diag(asarray(Ibus).flatten()))\n    diagVnorm = asmatrix(diag(V / abs(V)))\n\n    dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm\n    dS_dVa = 1j * diagV * conj(diagIbus - Ybus * diagV)\n    return dS_dVm, dS_dVa\n", "path": "pandapower/pf/dSbus_dV_pypower.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright 1996-2015 PSERC. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\n# Copyright (c) 2016-2018 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\n\n\"\"\"Computes partial derivatives of power injection w.r.t. voltage.\n\"\"\"\n\nfrom numpy import conj, diag, asarray\nfrom scipy.sparse import issparse, csr_matrix as sparse\n\n\ndef dSbus_dV(Ybus, V):\n    \"\"\"Computes partial derivatives of power injection w.r.t. voltage.\n    \"\"\"\n\n    if issparse(Ybus):\n        return dSbus_dV_sparse(Ybus, V)\n    else:\n        return dSbus_dV_dense(Ybus, V)\n\n\ndef dSbus_dV_sparse(Ybus, V):\n    Ibus = Ybus * V\n    ib = range(len(V))\n    diagV = sparse((V, (ib, ib)))\n    diagIbus = sparse((Ibus, (ib, ib)))\n    diagVnorm = sparse((V / abs(V), (ib, ib)))\n    dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm\n    dS_dVa = 1j * diagV * conj(diagIbus - Ybus * diagV)\n    return dS_dVm, dS_dVa\n\n\ndef dSbus_dV_dense(Ybus, V):\n    # standard code from Pypower (slower than above)\n    Ibus = Ybus * asarray(V).T\n\n    diagV = asarray(diag(V))\n    diagIbus = asarray(diag(asarray(Ibus).flatten()))\n    diagVnorm = asarray(diag(V / abs(V)))\n\n    dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm\n    dS_dVa = 1j * diagV * conj(diagIbus - Ybus * diagV)\n    return dS_dVm, dS_dVa\n", "path": "pandapower/pf/dSbus_dV_pypower.py"}]}