Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
# Welcome to dumbpy

| | |
|--------|--------|
| Package | [![Latest PyPI Version](https://img.shields.io/pypi/v/dumbpy.svg)](https://pypi.org/project/dumbpy/) [![Supported Python Versions](https://img.shields.io/pypi/pyversions/dumbpy.svg)](https://pypi.org/project/dumbpy/) |
| Meta | [![Code of Conduct](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) |
| | |
|------------------------------------|------------------------------------|
| Package | [![Latest PyPI Version](https://img.shields.io/pypi/v/dumbpy.svg)](https://pypi.org/project/dumbpy/) [![Supported Python Versions](https://img.shields.io/pypi/pyversions/dumbpy.svg)](https://pypi.org/project/dumbpy/) |
| Meta | [![Code of Conduct](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) |

*TODO: the above badges that indicate python version and package version will only work if your package is on PyPI.
If you don't plan to publish to PyPI, you can remove them.*
*TODO: the above badges that indicate python version and package version will only work if your package is on PyPI. If you don't plan to publish to PyPI, you can remove them.*

dumbpy is a dumber version of numpy.
DumbPy is an alternative version of NumPy, which facilitates scientific computing using Python. DumbPy contains numeric functions that provide useful summary statistics of numerical lists, listed below. DumbPy additionally carries out strict input testing to provide clear and user-friendly error messages and facilitate proper usage.

DumbPy Functions:

- Helper functions - these functions will test the inputted object, and will catch any input besides a list of numbers and produce suitable error messages.

- Mean - the mean function will calculate and return the mean, or the average, of the inputted numerical list.

- Standard Deviation - the standard deviation function will calculate and return the standard deviation of the inputted numerical list.

- Median - the median function will calculate and return the median value of the inputted numerical list

As stated above, the NumPy package already exists and provides similar functions. NumPy can be found at the following link: <https://numpy.org/>. DumbPy is an alternative version, which \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_.

## Get started

You can install this package into your preferred Python environment using pip:

```bash
``` bash
$ pip install dumbpy
```

TODO: Add a brief example of how to use the package to this section

To use dumbpy in your code:

```python
``` python
>>> import dumbpy
>>> dumbpy.hello_world()
```

## Copyright

- Copyright © 2026 Hector Palafox.
- Free software distributed under the [MIT License](./LICENSE).
- Copyright © 2026 Hector Palafox.
- Free software distributed under the [MIT License](./LICENSE).
28 changes: 28 additions & 0 deletions src/dumbpy/std_deviation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""
A module that calculates the standard deviation of a list of numbers.

"""

def std_deviation(input):
"""
Calculate the standard deviation of the inputted list and return the result.

Parameters
----------
input : list
A list of numbers.

Returns
-------
float
The standard deviation of the list of numbers.

Examples
--------
>>> std_deviation([1, 1, 1, 1])
0
>>> add_numbers([1, 0, 1, 0])
0.5

"""

Loading