summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2023-01-25 13:48:42 -0500
committerGuillaume Horel <guillaume.horel@gmail.com>2023-01-25 13:48:42 -0500
commit5dbd62d09d544e8e084e0b906adbde64800559b0 (patch)
tree0e256e5fb730afebe7a881685eeb0bca37e3a694
parent2edf7ad06fa58cf8769723192ea4a1305edd8513 (diff)
downloadpyisda-5dbd62d09d544e8e084e0b906adbde64800559b0.tar.gz
recreate the map
-rw-r--r--pyisda/credit_index.pyx2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx
index 96bfb18..d38416f 100644
--- a/pyisda/credit_index.pyx
+++ b/pyisda/credit_index.pyx
@@ -615,6 +615,7 @@ cdef class CreditIndex(CurveList):
sc_copy = sc_orig
tweak_curve(sc_orig, sc_copy, epsilon, mask)
else:
+ self.names.clear()
for i in range(self._curves.size()):
buf = self._curves[i].get()
offset = name_offset_from_buf(buf)
@@ -627,6 +628,7 @@ cdef class CreditIndex(CurveList):
sc_copy.fArray = <TRatePt*>(new_buf + sizeof(TCurve))
tweak_curve(sc_orig, sc_copy, epsilon, mask)
self._curves[i].reset(new_buf, char_free)
+ self.names[CurveName(new_buf + offset)] = i
def survival_matrix(self, const TDate[::1] schedule=None, double epsilon=0., bint log=False):
cdef: