Skip to main content

A package that converts numbers in Western digits into Maya numerical glyphs.

Project description

Maya Numerals

Maya Numerals is a package that converts numbers written in Western digits into Maya numerical glyphs (represented in Unicode). Simply input a number to the package and get a list of the Maya glyphs that comprise that number in ascending order. For more information on Maya numerical writing, please consult the background section below.

Installation and Usage

Install using pip:

pip3 install maya_numerals

Maya Numerals takes a single integer as an argument. You can use the package on an integer with the following syntax:

from maya_numerals import mn

mn.convert(39)
# returns ['ᴮ9', 'ᴮ1']

Font

The Maya numeral Unicode characters are supported by this font from BabelStone, which is licensed under the SIL Open Font License 1.1. Per BabelStone:

...you are free to use it for personal or commercial purposes, and to redistribute it by itself or as part of a free or commercial software package, just as long as you do not sell the font on its own. The license also allows you to modify the font in any way you like, as long as the modified font does not use "BabelStone" in its name. Please read the license for details.

Background

Maya numerals use a vigesimal (base-20) positional numeral system to represent numbers. From Wikipedia:

For example, thirteen is written as three dots in a horizontal row above two horizontal bars; sometimes it is also written as three vertical dots to the left of two vertical bars. With these three symbols, each of the twenty vigesimal digits could be written.

Numbers after 19 were written vertically in powers of twenty.

For more information, consult the full Wikipedia article.

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

maya_numerals-0.0.1.tar.gz (27.5 kB view hashes)

Uploaded Source

Built Distribution

maya_numerals-0.0.1-py3-none-any.whl (28.2 kB view hashes)

Uploaded Python 3

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