From ede3b0735748565440e8395e965f33f96a8717bf Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Thu, 26 Jan 2023 13:56:02 -0500 Subject: allow to subclass deepcopy --- pyisda/credit_index.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx index 4bed815..0ce2161 100644 --- a/pyisda/credit_index.pyx +++ b/pyisda/credit_index.pyx @@ -276,7 +276,7 @@ cdef class CreditIndex(CurveList): def __deepcopy__(self, memo): cdef: - CreditIndex copy = CreditIndex.__new__(CreditIndex) + CreditIndex copy = type(self).__new__(type(self)) size_t i int n TContingentLeg* cl -- cgit v1.2.3-70-g09d2