# How to add noise to time series data in Python? [closed]

I have time series data with $x$, $y$, $z$ sampled at $50\textrm{ Hz}$ from a sensor and I would like to add a uniform and Laplace noise to it. How would I achieve this in Python?

## closed as off-topic by MBaz, Matt L., Laurent Duval, Peter K.♦Dec 30 '16 at 19:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "General programming questions are off-topic here, but can be asked on Stack Overflow." – MBaz, Matt L., Peter K.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Could you please recommend the right site for such a question? I posted a similar question on stackoverflow.com and I haven't gotten any response yet here I got someone who gave me a hint which I am trying out. – DSPNewbie Jan 2 '17 at 5:41

1. I'm not sure if this is the right forum for python questions.
2. You left some relevant information, like the type of variable your data is stored.
3. I assume that "la place" is laplace distribution.

import numpy as np
i = len(data)
# create 1D numpy data:
npdata = np.asarray(data).reshape((i))
u = npdata + np.random.uniform(size=npdata.shape)