# HG changeset patch
# User Joris Vankerschaver <joris.vankerschaver@gmail.com>
# Date 1348842516 -3600
# Node ID 5c8769bc600f209e56117c965843514960d51af2
# Parent 59a76a59c8e7c4b25cc26a30d8922b580be077bf
trac 13530: spline list method exposes interpolation points
diff --git a/sage/gsl/interpolation.pyx b/sage/gsl/interpolation.pyx
a
|
b
|
|
201 | 201 | |
202 | 202 | def list(self): |
203 | 203 | """ |
204 | | Underlying list of points that this spline goes through. This |
205 | | is a reference to the list, not a copy. |
| 204 | Underlying list of points that this spline goes through. |
206 | 205 | |
207 | 206 | EXAMPLES:: |
208 | 207 | |
209 | 208 | sage: S = spline([(1,1), (2,3), (4,5)]); S.list() |
210 | 209 | [(1, 1), (2, 3), (4, 5)] |
| 210 | |
| 211 | This is a copy of the list, not a reference (:trac:`13530`):: |
| 212 | |
| 213 | sage: S = spline([(1,1), (2,3), (4,5)]) |
| 214 | sage: L = S.list(); L |
| 215 | [(1, 1), (2, 3), (4, 5)] |
| 216 | sage: L[2] = (3, 2) |
| 217 | sage: L |
| 218 | [(1, 1), (2, 3), (3, 2)] |
| 219 | sage: S.list() |
| 220 | [(1, 1), (2, 3), (4, 5)] |
| 221 | |
211 | 222 | """ |
212 | | return self.v |
| 223 | return self.v[:] |
213 | 224 | |
214 | 225 | def __len__(self): |
215 | 226 | """ |