From c1cee00bec688981dc6a901299106c8fd956f857 Mon Sep 17 00:00:00 2001 From: Anton Akhmerov <anton.akhmerov@gmail.com> Date: Mon, 31 Dec 2018 12:30:50 +0100 Subject: [PATCH] avoid using deprecated block matrix call --- kwant/_plotter.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kwant/_plotter.py b/kwant/_plotter.py index 771e9ba2..991fed41 100644 --- a/kwant/_plotter.py +++ b/kwant/_plotter.py @@ -119,9 +119,12 @@ if mpl_available: phi = np.linspace(0, pi, 21) xyz = np.c_[np.cos(phi), np.sin(phi), 0 * phi].T.reshape(-1, 1, 21) - unit_sphere = np.bmat([[xyz[0], xyz[2]], [xyz[1], xyz[0]], - [xyz[2], xyz[1]]]) - unit_sphere = np.asarray(unit_sphere) + # TODO: use np.block once we depend on numpy >= 1.13. + unit_sphere = np.vstack([ + np.hstack([xyz[0], xyz[2]]), + np.hstack([xyz[1], xyz[0]]), + np.hstack([xyz[2], xyz[1]]), + ]) def projected_length(ax, length): rc = np.array([ax.get_xlim3d(), ax.get_ylim3d(), ax.get_zlim3d()]) -- GitLab