numpy
Skill: NumPy
Best practices for numerical computing with NumPy including arrays, broadcasting, and vectorization.
When to Use
Apply this skill when doing numerical computing with NumPy — arrays, broadcasting, linear algebra, random sampling.
Arrays
- Use explicit dtypes (
np.float64,np.int32) when creating arrays. - Prefer
np.zeros,np.ones,np.empty,np.arange,np.linspaceover list-based construction. - Use structured arrays or separate arrays instead of object arrays.
Vectorization
- Replace Python loops with vectorized NumPy operations wherever possible.
- Use broadcasting rules to operate on arrays of different shapes without explicit expansion.
- Use
np.where()for conditional element-wise operations.
More from microsoft/debugpy
pytest
Best practices for writing and organizing tests with pytest including fixtures, parametrize, and plugins.
8jinja2
Best practices for template rendering with Jinja2 including environments, filters, autoescaping, and security.
8requests
Best practices for HTTP client usage with Requests including sessions, error handling, and timeouts.
6flask
Best practices for Flask web development including routing, blueprints, and testing.
6django
Best practices for Django web development including models, views, templates, and testing.
5click
Best practices for building CLI applications with Click including commands, groups, options, and testing.
3