Skip to content

Commit

Permalink
fixed orbitals=slice(1, None) arguments
Browse files Browse the repository at this point in the history
It was returning geometr.na, while it should
return geometry.no.

This commit fixes this.

Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Dec 5, 2024
1 parent 50ed40b commit 1e6ae8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ we hit release version 1.0.0.

### Fixed
- `projection` arguments of several functions has been streamlined
- `orbitals` arguments with slices without ends returned up to `geometry.na`,
now it correctly returns up to the maximum number of orbitals.

### Changed
- internal Cython code for performance improvements.
Expand Down
2 changes: 1 addition & 1 deletion src/sisl/_core/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def _(self, orbitals: slice) -> ndarray:
if start is None:
start = 0
if stop is None:
stop = self.na
stop = self.no
if step is None:
step = 1
return np.arange(start, stop, step)
Expand Down

0 comments on commit 1e6ae8e

Please sign in to comment.