Socket
Socket
Sign inDemoInstall

sigfig

Package Overview
Dependencies
1
Maintainers
1
Alerts
File Explorer

Install Socket

Protect your apps from supply chain attacks

Install

sigfig

Python library for rounding numbers (with expected results)

    1.3.3

Maintainers
1

Readme

sigfig
======

.. image:: https://img.shields.io/pypi/v/sigfig.svg
    :target: https://pypi.org/project/sigfig/
    :alt: Version
.. image:: https://readthedocs.org/projects/sigfig/badge/?version=latest
    :target: http://sigfig.readthedocs.io/
    :alt: Documentation
.. image:: https://img.shields.io/pypi/pyversions/sigfig.svg
    :target: https://pypi.python.org/pypi/sigfig/
    :alt: Python Versions
.. image:: https://codecov.io/gh/mikebusuttil/sigfig/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/mikebusuttil/sigfig/
    :alt: Coverage Status

This is the **sigfig** Python package used for rounding numbers (with expected results).

.. code:: python

    >>> round(0.25, 1)
    0.2
    >>> from sigfig import round
    >>> round(0.25, decimals=1)
    0.3
    >>> round(3.14159, sigfigs=2)
    3.1
    >>> round(3.14159, uncertainty=0.003639)
    '3.142 ± 0.004'
    >>> round('3.141592653589793', '0.00000002567', format='Drake')
    '3.141 592 654(26)'

Key Features:

* round numbers by significant figures/digits
* round numbers by decimal places
* round numbers by uncertainty/error
* format numbers in a variety of common styles & notations
* read in numbers of any type

In-depth documentation can be found here:

* `Installation <https://sigfig.readthedocs.io/en/latest/install.html>`_
* `Usage Guide <https://sigfig.readthedocs.io/en/latest/usage.html>`_
* `API Documentation <https://sigfig.readthedocs.io/en/latest/api.html>`_
* `Project Development & Roadmap <https://sigfig.readthedocs.io/en/latest/roadmap.html>`_

Useful links:

* Python Package Index entry: https://pypi.org/project/sigfig/
* Source Code: https://github.com/drakegroup/sigfig/

Please direct any comments/suggestions/feedback/bugs to mike.busuttil@gmail.com and valdezt@gmail.com

Thanks for downloading :)

Keywords

FAQs


Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc