@@ -127,8 +127,8 @@ def ctrlpts(self):
127
127
# Populate the cache, if necessary
128
128
if not self ._cache ['ctrlpts' ]:
129
129
c , w = compatibility .separate_ctrlpts_weights (self ._control_points )
130
- self ._cache ['ctrlpts' ] = [ crd for crd in c ]
131
- self ._cache ['weights' ] = w
130
+ self ._cache ['ctrlpts' ] = self . _array_type ( iter ( c ))
131
+ self ._cache ['weights' ] = self . _array_type ( iter ( w ))
132
132
return self ._cache ['ctrlpts' ]
133
133
134
134
@ctrlpts .setter
@@ -159,8 +159,8 @@ def weights(self):
159
159
# Populate the cache, if necessary
160
160
if not self ._cache ['weights' ]:
161
161
c , w = compatibility .separate_ctrlpts_weights (self ._control_points )
162
- self ._cache ['ctrlpts' ] = [ crd for crd in c ]
163
- self ._cache ['weights' ] = w
162
+ self ._cache ['ctrlpts' ] = self . _array_type ( iter ( c ))
163
+ self ._cache ['weights' ] = self . _array_type ( iter ( w ))
164
164
return self ._cache ['weights' ]
165
165
166
166
@weights .setter
@@ -192,6 +192,7 @@ def reset(self, **kwargs):
192
192
if reset_ctrlpts :
193
193
# Delete the caches
194
194
self ._cache ['ctrlpts' ] = self ._init_array ()
195
+ # TODO: why is this reset differently from the initialisation?
195
196
self ._cache ['weights' ][:] = self ._init_array ()
196
197
197
198
@@ -330,8 +331,8 @@ def ctrlpts(self):
330
331
"""
331
332
if not self ._cache ['ctrlpts' ]:
332
333
c , w = compatibility .separate_ctrlpts_weights (self ._control_points )
333
- self ._cache ['ctrlpts' ] = [ crd for crd in c ]
334
- self ._cache ['weights' ] = w
334
+ self ._cache ['ctrlpts' ] = self . _array_type ( iter ( c ))
335
+ self ._cache ['weights' ] = self . _array_type ( iter ( w ))
335
336
return self ._cache ['ctrlpts' ]
336
337
337
338
@ctrlpts .setter
@@ -361,8 +362,8 @@ def weights(self):
361
362
"""
362
363
if not self ._cache ['weights' ]:
363
364
c , w = compatibility .separate_ctrlpts_weights (self ._control_points )
364
- self ._cache ['ctrlpts' ] = [ crd for crd in c ]
365
- self ._cache ['weights' ] = w
365
+ self ._cache ['ctrlpts' ] = self . _array_type ( iter ( c ))
366
+ self ._cache ['weights' ] = self . _array_type ( iter ( w ))
366
367
return self ._cache ['weights' ]
367
368
368
369
@weights .setter
@@ -518,8 +519,8 @@ def ctrlpts(self):
518
519
"""
519
520
if not self ._cache ['ctrlpts' ]:
520
521
c , w = compatibility .separate_ctrlpts_weights (self ._control_points )
521
- self ._cache ['ctrlpts' ] = [ crd for crd in c ]
522
- self ._cache ['weights' ] = w
522
+ self ._cache ['ctrlpts' ] = self . _array_type ( iter ( c ))
523
+ self ._cache ['weights' ] = self . _array_type ( iter ( w ))
523
524
return self ._cache ['ctrlpts' ]
524
525
525
526
@ctrlpts .setter
@@ -549,8 +550,8 @@ def weights(self):
549
550
"""
550
551
if not self ._cache ['weights' ]:
551
552
c , w = compatibility .separate_ctrlpts_weights (self ._control_points )
552
- self ._cache ['ctrlpts' ] = [ crd for crd in c ]
553
- self ._cache ['weights' ] = w
553
+ self ._cache ['ctrlpts' ] = self . _array_type ( iter ( c ))
554
+ self ._cache ['weights' ] = self . _array_type ( iter ( w ))
554
555
return self ._cache ['weights' ]
555
556
556
557
@weights .setter
0 commit comments