Skip to content

Convert to Python 3 - Issue with MonthlyDateIndex #2

@Specchig

Description

@Specchig

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions