Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apytypes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apytypes

Python package for custom fixed-point and floating-point formats

  • 0.2.2
  • PyPI
  • Socket score

Maintainers
1

APyTypes

PyPI pre-commit.ci status License Workflow Status codecov DOI

APyTypes is a Python library providing algorithmic scalar and array data types, both fixed- and floating-point in Python. The main purpose is to simplify finite word length design and simulation. Written in C++, the focus is on performance and flexibility.

Documentation

https://apytypes.github.io/apytypes/

Installation

APyTypes is available in the Python Package Index and can be installed with the pip package installer:

pip install apytypes

Running

The package can now be used as:

$ python
>>> from apytypes import APyFixed
>>> fx_a = APyFixed.from_float(3.5, 4, 4)
>>> print(fx_a)
3.5
>>> fx_a
APyFixed(56, bits=8, int_bits=4)
>>> fx_b = APyFixed.from_float(1.25, 3, 6)
>>> fx_a + fx_b
APyFixed(304, bits=11, int_bits=5)
>>> print(fx_a + fx_b)
4.75

Tests

Test dependencies can be installed by running pip install [.test] and then executed by pytest.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc