Update trajectory.py

Inplace operation on numpy array saves half the memory. Maybe useful for large arrays or 32-bit systems.