Skip to main content

No project description provided

Project description

ml_dtypes

Unittests Wheel Build PyPI version

This is not an officially supported Google product.

ml_dtypes is a stand-alone implementation of several NumPy dtype extensions used in machine learning libraries, including:

  • bfloat16: an alternative to the standard float16 format
  • float8_*: several experimental 8-bit floating point representations including:
    • float8_e4m3b11
    • float8_e4m3fn
    • float8_e5m2

Installation

We will soon release pre-built wheels for this package at http://pypi.org/project/ml-dtypes, so this package can be easily pip installed.

To build locally, clone the repository and run:

$ git submodule init
$ git submodule update
$ pip install .

Example Usage

>>> from ml_dtypes import bfloat16
>>> import numpy as np
>>> np.zeros(4, dtype=bfloat16)
array([0, 0, 0, 0], dtype=bfloat16)

Importing ml_dtypes also registers the data types with numpy, so that they may be referred to by their string name:

>>> np.dtype('bfloat16')
dtype(bfloat16)
>>> np.dtype('float8_e5m2')
dtype(float8_e5m2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ml_dtypes-0.0.2rc5.tar.gz (683.1 kB view details)

Uploaded Source

Built Distributions

ml_dtypes-0.0.2rc5-cp311-cp311-win_amd64.whl (135.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

ml_dtypes-0.0.2rc5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (230.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ml_dtypes-0.0.2rc5-cp311-cp311-macosx_10_9_universal2.whl (311.9 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

ml_dtypes-0.0.2rc5-cp310-cp310-win_amd64.whl (135.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

ml_dtypes-0.0.2rc5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (230.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ml_dtypes-0.0.2rc5-cp310-cp310-macosx_10_9_universal2.whl (311.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

ml_dtypes-0.0.2rc5-cp39-cp39-win_amd64.whl (135.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

ml_dtypes-0.0.2rc5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (231.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ml_dtypes-0.0.2rc5-cp39-cp39-macosx_10_9_universal2.whl (312.2 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

ml_dtypes-0.0.2rc5-cp38-cp38-win_amd64.whl (134.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

ml_dtypes-0.0.2rc5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (231.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

ml_dtypes-0.0.2rc5-cp38-cp38-macosx_10_9_universal2.whl (311.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file ml_dtypes-0.0.2rc5.tar.gz.

File metadata

  • Download URL: ml_dtypes-0.0.2rc5.tar.gz
  • Upload date:
  • Size: 683.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ml_dtypes-0.0.2rc5.tar.gz
Algorithm Hash digest
SHA256 f7c46c1fcf2422407f9bdc590f9e4abf2cbbc01321a808f83010d20be53c81df
MD5 abc63a82482008cd048bd02d54f47f9a
BLAKE2b-256 f0bb12a8452102a85178fa29210343fd450680736976b5ea48440757bbf4a878

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4c3b5e28a4ce2e2474dc42778c6edc77037443e552d388c25309066babc62e3d
MD5 7e5d9ebd7fde623761a885447b7020c0
BLAKE2b-256 5c9cda32a83348e16405623f5aefbd8779e6b2bfef3fb63fce304ab2f747ddc9

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 71acd6cad9e7f3de19141617ca7e7f2b35d4667e926742896c94db3374c6881f
MD5 5cc15dbefc09331795d076e517308ffd
BLAKE2b-256 699a53605c376f2c376604ab911033936ef357bdeb7d8451e9908b9bcbc5f77b

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 72574c6303d84aae85df708ffd6057388eb98e26829bfd7539d20fc1ab7d96c3
MD5 f8444195ffef84af3c006ce876b7c9fc
BLAKE2b-256 6f8353f06a3c06cfbd9fb4cfaf2dd34a943a501392a58a1cfeac0b036b003013

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b312303ca604f4d1a627c28e0914501cad0dbf7be0c456aac44c3c803acfa9a3
MD5 7d16744807cd4a3747441c99e149513b
BLAKE2b-256 21f1e280fc0b6f9177ccafddd9c58573a960216da8936667f59ba7cf2d245394

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dd25c5308f265a46711249db17a1a3730f40820157b96bd9e282de6a49dd8817
MD5 fbe0224aa03e740d8ab3baa791ff7aa4
BLAKE2b-256 1c301514a8d1fd8796d7f28de70b0ed766569bcc4f5393bbb4a6a994d6cd8bfa

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 71b3ff181841a018b7613bf040540cf012479fa2e3824d70077615fd7ca9cf53
MD5 62bf80d92be8dc694b6a887d28eaa911
BLAKE2b-256 f0edbe1f7b5a3b851643b577b3174b28ffad363375b37e4648c036c9f2ecc069

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cd3aa555c84f02210431da2cc41a3111ea4028c76f7c929178299cf4d4600870
MD5 47626bfc6c57a32a67e15c70b69868be
BLAKE2b-256 14c562ed6d2ead82aa5b1ef748de46f687a6591208d72e9fadbf836c3c547692

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e22d6aadabad0128c98db40dfcad03399a5c3d2a5579cd53f2b8f097479204d
MD5 80eedc4838490b49c5b54ebd435f8570
BLAKE2b-256 b3e41e0f4818b6a0716338fe59c050157cc07c2500bc5c5b38e40fd407c1888d

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e22c850f22fe1b754e928c369f6d659fb2f69c6c17427705956d6c2c2bb82f9e
MD5 f54ad75c24c922ac8d93213a73e7a910
BLAKE2b-256 e22f87f57e54418305251ed5492b40f9499e45e6a58caef2ffad67ae795d1342

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 97d8645cb40235178aa5731046b34218005be7751069231ec40d8d59512b06a3
MD5 1b3837a499097830066c8ab734da6662
BLAKE2b-256 a73f65ad400601bb8a3ae370c0c60cd99eb8732a54398d6b4b54d37fdd04eddd

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2ba8f38e321d712f8d6d086334aab10372dcd18f90ad941c14c517f4a08613a5
MD5 0b8aca7405682a5f71e52d6c197f1f96
BLAKE2b-256 b63390f1505996625d10741137fa4caee61fec19396096b7297b24e11ab9d126

See more details on using hashes here.

Provenance

File details

Details for the file ml_dtypes-0.0.2rc5-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ml_dtypes-0.0.2rc5-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 07ef8d27b68e8270e1e8565a9d6288c2ba6e5f245366456fccc72ae1c89e7f55
MD5 016d821d387c399759fc21e523d6bdab
BLAKE2b-256 07a1bc70b41a3e990085cb6d278bf505a3ada91ea162d9e87711ce5a93d0a36e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page