-
Notifications
You must be signed in to change notification settings - Fork 824
Closed
Description
Expected behavior
MemoryReader.copy should return a working-as-intended MemoryReader
Actual behavior
The Timestep attached to the MemoryReader is disjointed from the stored arrays on MemoryReader. Modifying the Timestep then doesn't update the underlying arrays
Code to reproduce the behavior
from MDAnalysis.coordinates.memory import MemoryReader
import numpy as np
coords = np.arange(60).reshape(2, 10, 3).astype(np.float32)
mr = MemoryReader(coords)
mr.coordinate_array
mr2 = mr.copy()
# assign value to positions
# as this is a memoryreader, this change should be permanent
mr2.ts.positions = -1
mr2[0]
assert mr2.ts.positions == -1 # will fail
# not saved to master array
mr2.coordinate_arrayCurrently version of MDAnalysis
- Which version are you using? (run
python -c "import MDAnalysis as mda; print(mda.__version__)") - Which version of Python (
python -V)? - Which operating system?
0.18.0
Reactions are currently unavailable