Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to Python 3 - Issue with MonthlyDateIndex #2

Open
Specchig opened this issue May 4, 2020 · 1 comment
Open

Convert to Python 3 - Issue with MonthlyDateIndex #2

Specchig opened this issue May 4, 2020 · 1 comment

Comments

@Specchig
Copy link

Specchig commented May 4, 2020

Hello @mdnahas / @as4456 ,

I am trying to re-use this code using python 3. It works fine in python 2 but as python 2 is currently deprecated since January 2020, I was trying to convert the code in python 3.

I started refactoring the code to make it work but I am facing an issue in Leo_Krippner_SSR/AAA_RUN_KANSM2_Est_LB.py"

YieldCurveDateIndex = MonthlyDateIndex[StartT:EndT+1]
TypeError: only integer scalar arrays can be converted to a scalar index

Steps to reproduce

  1. clone the repository
  2. use python 3 (currently I am using version 3.8)
  3. run data_read.py (with python 3)
  4. fix any fixable issue (print -> print ( and float / integer)
  5. run AAA_RUN_KANSM2_Est_LB.py
@RajaBellebon
Copy link

Hey @Specchig ,

I think I may have it working when updating StartT a value instead of an array.

More about it there

YieldCurveDateIndex = MonthlyDateIndex[StartT[0]:EndT[0] + 1]
YieldCurveData = MonthlyYieldCurveData[StartT[0]:EndT[0] + 1, IncludeMaturities]

However, I found other issues on the way and may fork the repository.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants