Skip to content

Commit

Permalink
allowed name in BandStructure, deprecated it in favor of names
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Sep 25, 2023
1 parent dd7cb6f commit dea8f6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial_siesta_2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/sisl/physics/brillouinzone.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit dea8f6b

Please sign in to comment.