diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2017-10-31 14:34:18 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2017-10-31 14:38:52 -0400 |
| commit | 4831d8069cb24b6a683c67ba55c78abec0316d8b (patch) | |
| tree | 806edf440842c01e627765591c26075269306c03 | |
| parent | 64422762f32ea4882ad7c6861fdf02877abf65f6 (diff) | |
| download | pyisda-4831d8069cb24b6a683c67ba55c78abec0316d8b.tar.gz | |
possible None
| -rw-r--r-- | pyisda/credit_index.pyx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx index 1dbd93c..663d6ed 100644 --- a/pyisda/credit_index.pyx +++ b/pyisda/credit_index.pyx @@ -40,7 +40,10 @@ cdef class CurveList: it = self.tickers.find(sc.ticker) if it == self.tickers.end(): self.tickers[sc.ticker] = i - self.curves.push_back(sc._thisptr) + if sc is not None: + self.curves.push_back(sc._thisptr) + else: + self.curves.push_back(shared_ptr[TCurve]()) self.weights.push_back(1.) i += 1 else: @@ -121,7 +124,10 @@ cdef class CurveList: it = self.tickers.find(sc.ticker) if it == self.tickers.end(): self.tickers[sc.ticker] = i - self.curves.push_back(sc._thisptr) + if sc is not None: + self.curves.push_back(sc._thisptr) + else: + self.curves.push_back(shared_ptr[TCurve]()) self.weights.push_back(1.) i += 1 else: |
