NumPy code snippets extended.