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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file maya_numerals-0.0.1.tar.gz
.
File metadata
- Download URL: maya_numerals-0.0.1.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d9d7ddaeb860545a55cd03086865429adba149cd60d46eca90b4da082d8d1f4 |
|
MD5 | 76ac1c87d3375e329e58a89a199b2a89 |
|
BLAKE2b-256 | d09f5481670df31fbb1af269faef7e71b1eaa2c74f62b72f65ed90a55f9b5d15 |
File details
Details for the file maya_numerals-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: maya_numerals-0.0.1-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b22f06753a85fd8584453e0369c59d7bd983e67d86c1efb78223e91f88941088 |
|
MD5 | 54a9d0eedcaf63c6a3600e1896d82556 |
|
BLAKE2b-256 | 8ad3ef6f2cea1c59d54e7a7f5d8b0ce74eeda036547fea69540ac9c5cc057b6b |