fix Quantity resize in Series.append
Created by: stefco
described in issue #758, https://github.com/gwpy/gwpy/issues/758
When trying to append to a Series
instance that already has _xindex initialized with an astropy.units.Quantity
value, an error is thrown due to the fact that Quantity
only owns a view to its own data and cannot therefore be resized.
Fix this by trying to copy the underlying numpy array in quantity.value
, resizing that copy, and then creating a new Quantity
instance with the resized array and the original quantity.unit
.