Updated NumPy code snippets.