Skip to content

Commit

Permalink
[NumpyVectorArray] fix data in presence of shallow copies
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrave committed Nov 29, 2016
1 parent 326e0cb commit aadb662
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pymor/vectorarrays/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def make_array(cls, subtype=None, count=0, reserve=0):

@property
def data(self):
if self._refcount[0] > 1:
self._deep_copy()
return self._array[:self._len]

@property
Expand Down

0 comments on commit aadb662

Please sign in to comment.