Skip to main content

No project description provided

Project description

shanten-tools

Fast calculation of shanten numbers in Japanese Mahjong.

Usage

>>> from shanten_tools import shanten
>>> import numpy as np
>>> hand = np.array([
>>>     3,1,1,1,1,1,1,1,3,
>>>     0,0,0,0,0,0,0,0,0,
>>>     0,0,0,0,0,0,0,0,0,
>>>     0,0,0,0,0,0,0], dtype=np.uint8)
>>> shanten(hand)
1
>>> hand = np.array([
>>>     3,1,1,1,1,1,1,1,3,
>>>     0,0,0,0,0,0,0,0,0,
>>>     0,0,0,0,0,0,0,0,0,
>>>     0,0,0,0,0,0,1], dtype=np.uint8)
>>> shanten_discard(hand)
array([2,1,2,2,1,2,2,1,2,
       0,0,0,0,0,0,0,0,0,
       0,0,0,0,0,0,0,0,0,
       0,0,0,0,0,0,1], dtype=uint64)

Notes

  • shanten number +1 is output

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

shanten_tools-0.1.8.tar.gz (660.3 kB view details)

Uploaded Source

Built Distributions

shanten_tools-0.1.8-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

shanten_tools-0.1.8-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

shanten_tools-0.1.8-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

shanten_tools-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

shanten_tools-0.1.8-cp310-none-win_amd64.whl (823.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

shanten_tools-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

shanten_tools-0.1.8-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.2 MB view details)

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

shanten_tools-0.1.8-cp39-none-win_amd64.whl (824.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

shanten_tools-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

shanten_tools-0.1.8-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.2 MB view details)

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

shanten_tools-0.1.8-cp38-none-win_amd64.whl (823.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

shanten_tools-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

shanten_tools-0.1.8-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.2 MB view details)

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

shanten_tools-0.1.8-cp37-none-win_amd64.whl (823.9 kB view details)

Uploaded CPython 3.7 Windows x86-64

shanten_tools-0.1.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

shanten_tools-0.1.8-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.2 MB view details)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

File details

Details for the file shanten_tools-0.1.8.tar.gz.

File metadata

  • Download URL: shanten_tools-0.1.8.tar.gz
  • Upload date:
  • Size: 660.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.13.6

File hashes

Hashes for shanten_tools-0.1.8.tar.gz
Algorithm Hash digest
SHA256 76d0bd55aa36a9e7ec11787bc5799bba8ec10e5c6b1dbbe8d1fc6a4ef7cc760b
MD5 4d4c1d533ca0df67f1e4ec2710327a39
BLAKE2b-256 2d3fb6f7cccbe0a4589a187fddb3d7e4b4eb20e453156cadcc872f1bc34626b1

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0ac4442734dd589d762035319c1fc2da8e0eb7d88cf64c2332df98b2ff19c65
MD5 d6e3b945b5b84b8b2c980cdde67541bf
BLAKE2b-256 9bddd3e420b84e0e68212130eae0b8cd6b42c89adcf42a31e8819d02591616f5

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8a820493589833fd687f61f2f0d2a3a3e0a598133fc4339d3c2ea7811978e0d
MD5 a61cf516a1d7ecfa05c49c426c6f7518
BLAKE2b-256 3126cae41d280527bc919da68dd98e6218e1fe7bdc4288e0b270a330d841ee0f

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 756cf523c6dff1707e1d6ba4cfb0d6e7eeb96fc4aea6179f8593973a3dfc7f85
MD5 cfb3eb2b23201a097e86b5c330d9f090
BLAKE2b-256 0045cb7503748a5599dda772826f22286cb6a8e1d246323caa0bea5e2a297816

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba5fef7e0d6ae9a57b8914e77794512e50d39fbb219b421845d7b0c40c25a65b
MD5 4c0957257b7cec5ce1a61231f03a958e
BLAKE2b-256 1c8afefa2bbfd5096532484ed4c83164abe1d03337c1b477d4aa90f7ad80496b

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 0530752f8dc1b5b0a73c7b2724c91404d9123d8777cbcebc892f5203baeca9ba
MD5 53adb7c7aa2fe7673029eb20a02197fc
BLAKE2b-256 02374a3bce7d30122e2bff1a0c24fe86a47f4aa13fa9b99dca24bc7dd231a1fe

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dea9bac83c6a00ce5a2a30333fa7dd8bfe47627471dcd1fcc525c97e5e7aa059
MD5 7049fce01c5529da81d47d960a077a23
BLAKE2b-256 f0ffbacc63d1a1f8025a4e238eb5515da5d61499443e7fe3edc1aff9ee628165

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2caa1d86a223aa5613003da778362c293c3bd7d3158039ddef3a902957a12b9c
MD5 b021e0cc8ba077e8f9aeef01b8f5d3e8
BLAKE2b-256 050b76506fd380d3a167e1d56f4bcca595c1af28c92392a7ebd6f547fe06c705

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 1b9e2ace7377a4e05f7a76fe794aaabc4717612427ef6648d41714fe1b212454
MD5 8d085f85ae83825f0092f7c4e5d32e57
BLAKE2b-256 b7c908569f291b4a47dbcda7b3567ada99913620da88dc110efcc83f2224d407

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1e471ba0f50a52f9f1108656f96644ea6977d73373d4fcefcbf2eae194e38593
MD5 d2d722df8d6af6d1f0bf28edc4151fd3
BLAKE2b-256 388e810eeb545418cd99c4783b111c70aa4a0a9f1f7bbbe96a2c90e8ff5ab865

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 64cc3fa25dcc9eefcff8440397917d4b19b31d21f0eb8fe80202bb07c18fd375
MD5 2467fcf507730725fb25e0cdf09dfdbc
BLAKE2b-256 1b66affe03b6a8f46536d3329d0d213306c315467422cfd817c980725e92b4a2

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 d49e5e0e7cdd627d42930c676281375d9736f940d06788c4cc4921c8e2d59e3c
MD5 c771e6cda719d5d044f7c07226de6804
BLAKE2b-256 3b09f57927aed38ecc155ec8d2ce2ef502e630466b6e6bb9b4c8a30b0b93d2e9

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e592fed3e2187aff4da9262c264a6eb9ab117ec96744210bf5ae310ff1725296
MD5 7f3a73c84509a344c9b491d173483896
BLAKE2b-256 2a439012810cebe1cef3f2e704c165e846d728dfc9ef56eaeb5bf0abf61f603c

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 54dcdfbb726e13e952d19cb2fcecb0f8a5c01455d112d529fba674add6ad17f5
MD5 3facad22a5bde8f71f6386e0de8bc904
BLAKE2b-256 0d88a549940e0b73a46f5f8652cb333b1e195f5eba0e5ce0924bbdb957749aa7

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp37-none-win_amd64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 1e7301736942b02ccd40079ad19ba34b3bcc8bc6c31ff92634fa541bf1a4daaa
MD5 05f5487bc977ab356d88eeb4312e4ac0
BLAKE2b-256 90144d9b678499c78a288e0f05c29c09c1b3b50fbe3a6f3ea41133ef53e8dc3b

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 21a95c312a28b41084092410e0f2705cf48d563f4a63bb15788adebfe9af28db
MD5 6f8fede747f529210f23a21a7f9275ac
BLAKE2b-256 34837aadd72c70a82ef5aa9c4e5fcae1aca76ac2d3fec9a018082f4f86f04cb6

See more details on using hashes here.

File details

Details for the file shanten_tools-0.1.8-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for shanten_tools-0.1.8-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e646bafe00da80a926dbc3c6c9d45bb8c6f3c36a7578da429b919bfcc4bc908b
MD5 d35c43e9271ba5bd61e7d2e391a506c0
BLAKE2b-256 5480201fb3ec4fedb7a2e24f890471c9a1619806a0f680c4c6ae8c415c91152e

See more details on using hashes here.

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