Skip to content

Commit a4d59cf

Browse files
committed
FEAT: Incorporate FIndex in index matrix demo.
1 parent 2bbcaed commit a4d59cf

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

faslr/demos/index/index_matrix_demo.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88

99
from faslr.index import (
10-
index_matrix,
10+
FIndex,
1111
IndexMatrixWidget
1212
)
1313

@@ -25,19 +25,15 @@
2525
if TYPE_CHECKING:
2626
from pandas import DataFrame
2727

28-
rate_factors = [
29-
x + 1 for x in XYZ_RATE_CHANGES
30-
]
31-
32-
df_rl: DataFrame = index_matrix(
33-
years=XYZ_SAMPLE_YEARS,
34-
index=rate_factors
28+
index = FIndex(
29+
origin=XYZ_SAMPLE_YEARS,
30+
changes=XYZ_RATE_CHANGES
3531
)
3632

3733
app = QApplication(sys.argv)
3834

3935
index_matrix_widget = IndexMatrixWidget(
40-
matrix=df_rl
36+
matrix=index.matrix
4137
)
4238
index_matrix_widget.setWindowTitle("Index Matrix Demo")
4339

0 commit comments

Comments
 (0)