<jupyter_start><jupyter_text>Numpy exercisesRefer back to the Intro to `numpy` lesson from yesterday for reminders!***1) Using `numpy`, create an array that starts with the number `1`, ends with the number `1000`, counting by twos.  2a) Using `numpy`, create an array of 1,000,000 linearly-spaced values between zero and one.2b) Now do the same task using a `list` in pure Python code (no `numpy`)2c) Use the `%timeit` magic function to test which method is faster. 3) Using `numpy`, create a 1000-element array of normally distributed values ($\mu=0\,,\sigma=1$), and calculate the mean of that array.  4) Using the array you created in 3, replace the minimum value with `0`. 5) Use `numpy`'s indexing features to get (a) the negative values of the array from 4, (b) the non-negative values of the array from 4.  6) Use the lines below to generate a quiescent light curve with gaussian noise (flux vs. time measurements common in astronomy). Then, use `numpy`'s indexing features to do a "3$\sigma$ clip" (remove any values greater than three standard deviations from the mean flux).<jupyter_code>import numpy as np

light_curve = 1 + np.random.randn(10000)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08754208754208755, 'fraction_numerical': 0.031144781144781145, 'mean_word_length': 4.8861386138613865, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '300937', 'license': 'Apache-2.0', 'n_tokens_mistral': 367, 'n_tokens_neox': 334, 'n_words': 178, 'path': 'notebooks/numpy_exercises.ipynb', 'repo_name': 'bmorris3/2014_fall_ASTR599', 'size': '1188'}