# example_pkg

*module*

A tiny package, so the example site has an API reference to render.

[View source](https://github.com/max-models/starlight-theme/blob/devel/src/example_pkg/__init__.py#L1-L1)

## example_pkg.Grid

*class* · *dataclass*

```python
class Grid
```

Re-exported from: `example_pkg.grid`

A uniform grid of cells on ``[start, stop]``.

**Attributes**

- `start` (`float`) — Left end of the domain.
- `stop` (`float`) — Right end of the domain.
- `cells` (`int`) — Number of cells.

[View source](https://github.com/max-models/starlight-theme/blob/devel/src/example_pkg/grid.py#L10-L35)

### example_pkg.Grid.cells

*attribute* · *instance attribute*

```python
cells: int
```

[View source](https://github.com/max-models/starlight-theme/blob/devel/src/example_pkg/grid.py#L22-L22)

### example_pkg.Grid.start

*attribute* · *instance attribute*

```python
start: float
```

[View source](https://github.com/max-models/starlight-theme/blob/devel/src/example_pkg/grid.py#L20-L20)

### example_pkg.Grid.stop

*attribute* · *instance attribute*

```python
stop: float
```

[View source](https://github.com/max-models/starlight-theme/blob/devel/src/example_pkg/grid.py#L21-L21)

### example_pkg.Grid.spacing

*property*

```python
spacing: float
```

The cell width $h = (b - a) / n$.

[View source](https://github.com/max-models/starlight-theme/blob/devel/src/example_pkg/grid.py#L25-L27)

### example_pkg.Grid.nodes

*method*

```python
def nodes() -> np.ndarray
```

The ``cells + 1`` cell boundaries.

**Returns**

- (`np.ndarray`) — The node coordinates.

[View source](https://github.com/max-models/starlight-theme/blob/devel/src/example_pkg/grid.py#L29-L35)

## example_pkg.linspace_midpoints

*function*

```python
def linspace_midpoints(start: float, stop: float, cells: int) -> np.ndarray
```

Re-exported from: `example_pkg.grid`

The midpoints of ``cells`` uniform cells on ``[start, stop]``.

**Parameters**

- `start` (`float`) — Left end of the domain.
- `stop` (`float`) — Right end of the domain.
- `cells` (`int`) — Number of cells.

**Returns**

- (`np.ndarray`) — An array of length ``cells``.

[View source](https://github.com/max-models/starlight-theme/blob/devel/src/example_pkg/grid.py#L38-L50)

**Modules**

- `example_pkg.grid`
