diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bff680ac..db3d872b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,10 @@ Added: - `Add Channel Access Report functions <../../pull/115>`_ - Add ``WaveformIn`` to default exports from ``softioc.builder`` +Fixed: + +- `Fix DeprecationWarning from numpy when using "+" <../../pull/123>`_ + 4.2.0_ - 2022-11-08 ------------------- diff --git a/softioc/device.py b/softioc/device.py index 0b5dad81..7a577c29 100644 --- a/softioc/device.py +++ b/softioc/device.py @@ -409,7 +409,7 @@ def _value_to_epics(self, value): # common class of bug, at the cost of duplicated code and data, here we # ensure a copy is taken of the value. assert len(value) <= self._nelm, 'Value too long for waveform' - return +value + return numpy.copy(value) def _epics_to_value(self, value): return value diff --git a/softioc/fields.py b/softioc/fields.py index 63fa476e..a3bbb523 100644 --- a/softioc/fields.py +++ b/softioc/fields.py @@ -147,4 +147,4 @@ def __set_time(self, address, new_time): -__all__ = ['RecordFactory', 'DbfCodeToNumpy', 'ca_timestamp'] +__all__ = ['RecordFactory', 'ca_timestamp']