Skip to content

Commit

Permalink
update docstring in bloch
Browse files Browse the repository at this point in the history
  • Loading branch information
AsymmetryChou committed Feb 5, 2025
1 parent 43d7d0b commit 4d10aa6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions dptb/negf/bloch.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@

import numpy as np


# The Bloch class in Python defines a method to unfold k points based on a given Bloch factor.
class Bloch(object):

def __init__(self,bloch_factor) -> None:
'''This Python function initializes an object with a Bloch factor represented as a 3D vector.
Parameters
----------
bloch_factor
It is expected to be a list or numpy array representing a 3D vector to expand the provided
k points.
'''

if isinstance(bloch_factor,list):
bloch_factor = np.array(bloch_factor)
Expand All @@ -26,8 +34,7 @@ def unfold_points(self,k:list) -> np.ndarray:
Returns
-------
The `unfold_points` method returns a reshaped array of expansion points calculated based on the
input parameter `k` and the bloch factor `B`. The expansion points are created using B-casting rules
and then reshaped into a 2D array with 3 columns.
input parameter `k` and the bloch factor `B`.
'''

Expand Down

0 comments on commit 4d10aa6

Please sign in to comment.