From dea8f6b56bc14308912ae6ab70968aed6f1a7d89 Mon Sep 17 00:00:00 2001 From: Nick Papior Date: Mon, 25 Sep 2023 11:16:41 +0200 Subject: [PATCH] allowed name in BandStructure, deprecated it in favor of names Signed-off-by: Nick Papior --- docs/tutorials/tutorial_siesta_2.ipynb | 2 +- src/sisl/physics/brillouinzone.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/tutorial_siesta_2.ipynb b/docs/tutorials/tutorial_siesta_2.ipynb index 13e9ccbc45..658d90a746 100644 --- a/docs/tutorials/tutorial_siesta_2.ipynb +++ b/docs/tutorials/tutorial_siesta_2.ipynb @@ -212,7 +212,7 @@ " return eigenstate.eig\n", "# Define the band-structure\n", "bz = BandStructure(H, [[0] * 3, [2./3, 1./3, 0], [0.5, 0.5, 0], [1] * 3], 400, \n", - " name=[r'$\\Gamma$', r'$K$', r'$M$', r'$\\Gamma$'])\n", + " names=[r'$\\Gamma$', r'$K$', r'$M$', r'$\\Gamma$'])\n", "\n", "# Calculate all eigenvalues\n", "eig = bz.apply.array.eigenstate(wrap=wrap_fatbands).T\n", diff --git a/src/sisl/physics/brillouinzone.py b/src/sisl/physics/brillouinzone.py index 79c6aaf040..6e97ac105e 100644 --- a/src/sisl/physics/brillouinzone.py +++ b/src/sisl/physics/brillouinzone.py @@ -148,7 +148,7 @@ from sisl._internal import set_module from sisl.grid import Grid from sisl.lattice import Lattice -from sisl.messages import SislError, info, progressbar, warn +from sisl.messages import SislError, deprecate_argument, info, progressbar, warn from sisl.oplist import oplist from sisl.quaternion import Quaternion from sisl.unit import units @@ -1197,6 +1197,8 @@ class BandStructure(BrillouinZone): >>> bs = BandStructure(lattice, [[0, 0, 0], [0, 0.5, 0], None, [0.5, 0, 0], [0.5, 0.5, 0]], 200) """ + @deprecate_argument("name", "names", "argument 'name' has been deprecated in favor of 'names', please update your code.", + "0.15.0") def __init__(self, parent, *args, **kwargs): #points, divisions, names=None): super().__init__(parent)