Skip to content
Back to skills

Python Numpy Style

ASecurity

Write Python functions in the scientific computing group's NumPy style. Use whenever Python code is requested.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentspythongo

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add danielrispler/skill-truce --skill python-numpy-style --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Numpy Style?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Numpy Style
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/danielrispler-python-numpy-style/badge)](https://www.skillsdirectory.com/skills/danielrispler-python-numpy-style)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: python-numpy-style
description: Write Python functions in the scientific computing group's NumPy style. Use whenever Python code is requested.
---

# python-numpy-style

Scientific code here follows NumPy conventions and is written for readers who study the algorithm.

## Rules

- Start the module with `from __future__ import annotations`.
- Show a doctest-style example that uses `>>>`.
- State the time complexity as `Complexity: O(...)`.
- Export the function by defining `__all__`.
- Mark each non-obvious step with a comment that starts with `# NOTE:`.
- Write the docstring in NumPy style, with a `Parameters` header underlined by dashes. Never use `Args:`.

## Example

Request: Write a Python function that returns the median of a list of numbers.

Output:

```python
from __future__ import annotations

__all__ = ["median"]


def median(values):
    """Return the median of a list of numbers.

    Parameters
    ----------
    values : list of float
        The numbers to summarize.

    Returns
    -------
    float
        The median value.

    Examples
    --------
    >>> median([1, 3, 2])
    2
    """
    ordered = sorted(values)
    mid = len(ordered) // 2
    # NOTE: an even count averages the two middle values
    if len(ordered) % 2:
        return ordered[mid]
    return (ordered[mid - 1] + ordered[mid]) / 2
```

Complexity: O(n log n)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.