a
Project description
🍀 yotsuba
Install yotsuba.
- Via pip (under construction)
pip install yotsuba-python
- From source.
git clone https://github.com/yutayamazaki/yotsuba.git
cd yotsuba/bindings/python
python setup.py install
API documents.
yotsuba
yotsuba.pad_sequences(sequences: List[List[int]], maxlen: int, value: int = 1, padding: str = 'post') -> List[List[int]]
Pad sequences with given value like keras.preprocessing.sequence.pad_sequences
.
Parameters
sequences (List[List[int]])
- Sequences to padded.maxlen (int)
- Maximum sequence length to pad.value (int)
- A value used to pad sequences.padding (str)
- 'pre' or 'post', default is 'post'.
Returns
List[List[int]]
- An list of integers with shape (len(sequences), maxlen).
Raises
- ValueError - If
padding
is not 'pre' or 'post'.
Examples
from typing import List
import yotsuba
sequences: List[List[int]] = [[0, 2, 1], [0, 1]]
padding: List[List[int]] = yotsuba.pad_sequences(
sequences=sequences, maxlen=5, value=-1, padding='post'
)
assert padding == [[0, 2, 1, -1, -1], [0, 1, -1, -1, -1]]
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
yotsuba-python-0.1.3.tar.gz
(7.1 kB
view hashes)
Built Distributions
Close
Hashes for yotsuba_python-0.1.3-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6099d8d5326fb3dab20813d08bd604b07f4765aae6aaae5620c69739a09db52f |
|
MD5 | f184ddcbdb19a3038e023e9b3d5ef69a |
|
BLAKE2b-256 | 6a3e5a7fcc4d04fa4c3e5ee7d5eda96d5afc8cd73ac71ad6ab7d17796187fb56 |
Close
Hashes for yotsuba_python-0.1.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12df7dbc68f33ce54fb2da90b2bb4e132e11c15eca8e06af3d248ba1fc468aac |
|
MD5 | dec8eca4eb0c13ca311ee710962232f1 |
|
BLAKE2b-256 | 13232c7245d9d3d212e1d87166e1c76355bed293f524308398632a7e4d01b018 |
Close
Hashes for yotsuba_python-0.1.3-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83a1837ce9952d04b7b0342ba01353b0124ce6f2d95e117307b6f1bf880214e4 |
|
MD5 | 49e0b3a91afa61556d4e655b65727c4b |
|
BLAKE2b-256 | 13fb932d3cd5f2811e8755069d118e625f43227d56d7f68e8a85867ca4cbd45f |
Close
Hashes for yotsuba_python-0.1.3-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 338bb8ce3cb15a46fd6bc2270ef9f2ff5eaa64b4a65e6d13eaae6427a1680287 |
|
MD5 | 030f17b97cf84eaa2dedc2dcc8698f86 |
|
BLAKE2b-256 | c52b6f6623b5afb2cf18867191f1465eab4a0091765f27a41387f15742bd1341 |
Close
Hashes for yotsuba_python-0.1.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c14fc337a23286aba6cf7acc9a81047ee968b2199206ee10951d9f273d2da39 |
|
MD5 | 23dd4d394cbe21c6731f62182d46a2a4 |
|
BLAKE2b-256 | f3d94e8298d384aa5e777d356351f944c07d8b2ea7527e391d2514a285d9b577 |
Close
Hashes for yotsuba_python-0.1.3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6b35deb8c0a807354311b4968de06ba780e6a0b3c30956c1d663a908ff41979 |
|
MD5 | 2c4a876764050dfef907360eb66ff320 |
|
BLAKE2b-256 | d06ad31be2bdba71059ca348ed7f6b6912d4239d9a12338634c55814d64b3d0a |
Close
Hashes for yotsuba_python-0.1.3-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0520748d19fde9732458bb3b5ae5b1c0dbdcc742c34ad57dba4bc29ebd246af3 |
|
MD5 | e2645e9146fa2ab1ad54262922b2bb39 |
|
BLAKE2b-256 | e9c1d18979d18ab98661c35eafd4a4b52b616cc37be81de1c1686730b1577948 |
Close
Hashes for yotsuba_python-0.1.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d353d4f5acdf5f2839154e8fa6e07496cef1805b3cd12b0cd409504ce4a08de |
|
MD5 | 7944a97cd030977456308b1dd3e5469e |
|
BLAKE2b-256 | dd7e2266f6a1430d8be1b038ecd6b1f01eecad93b44f3031955457821ea924a4 |
Close
Hashes for yotsuba_python-0.1.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e61e70bf10f0a4713b930603385f8b03ac197c3e2e2fb981cec290365e3a6db7 |
|
MD5 | 895db051088278e0148b2ae2dacef960 |
|
BLAKE2b-256 | 0d0e9f91d701c8ea4134754813b2199f8d5e43104136ef7a3d5f613a9d0382d7 |
Close
Hashes for yotsuba_python-0.1.3-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc52a59a29440e7168f05b98bf5a1b296022845bf3bc099cc9d90c0a979cd8fd |
|
MD5 | 704de7a8b7089724773a699c8561880a |
|
BLAKE2b-256 | 1f81bd163192216fb25263b1ec9d59c1af17c4dd92d2212d9b71de72435c6cd8 |
Close
Hashes for yotsuba_python-0.1.3-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bda46f6475276cb01bb735b999e85be0d528352e78a9d883e4fb9b29ebbe5888 |
|
MD5 | ac0e721a1717d3e23e38a919574979d9 |
|
BLAKE2b-256 | 07016bee5328e6c6d05dca7af50519eec56aa914a5b153124560e5b941f32cd4 |
Close
Hashes for yotsuba_python-0.1.3-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da12dc62e7dbf99363dfe7e4b09dfdf24b19706ef587c651f1bc325ab1f3bd88 |
|
MD5 | 90e8ae0d6f81541d7bbd89756308506c |
|
BLAKE2b-256 | f6a30ce5857ddf0da6a2dad57512aa849af3ab5c64c13c90d2a1aaf9c7b9657d |
Close
Hashes for yotsuba_python-0.1.3-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 485d9ad75ff8358bc6769a56c8038243f4328991bf4d76e68a97dec149c8643f |
|
MD5 | b99ddf0a61bd8313194d7dafcbbf372a |
|
BLAKE2b-256 | 2a336d73e0637bf8f55d04e1abb54ea34040c33dd2e66589bcdea86bfc11524c |