wide-product implements a partial, column-wise Khatri-Rao product. It is fast, and works on sparse matrices.
It can be useful for engineering of cross-features for machine learning.
Definition
For a pair of scalars (~ one by one matrices), the wide product is multiplication:
wide_product ( [[a]], [[b]] ) == [[a * b]]
Where matrices are constructed by vertical stacking, the product is row-wise:
wide_product ( vstack((A, B)), vstack((C, D)) ) ==
vstack((wide_product(A, C),
wide_product(B, D)))
Where matrices are constructed by horizontal stacking, the product contains all the products of the subcomponents up to permutation of columns:
wide_product ( hstack((A, B)), hstack((C, D)) ) ==
hstack((wide_product(A, C),
wide_product(A, D),
wide_product(B, C),
wide_product(B, D)))
Installation
pip install wide-product
Development
To build the module:
python setup.py build
To test:
PYTHONPATH=$(echo build/lib*):. py.test
To install:
pip install .
Metadata
Release files for wide-product 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wide-product-0.1.1.tar.gz | 4.5 kB | Details |
Built distributions (wheels)
Total release size: 323.0 kB
Release files / wide-product-0.1.1.tar.gz
| Download URL | wide-product-0.1.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6d1af4e7b24ea0c1db620314cd488f0fd1c959db4095a03a635ffec9d482ab3
|
|
BLAKE2b-256 checksum How to use checksums |
dca5eaab255b23509293fa5a69847195b87e7fc5e9e93606b6aad8766311c253
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | wide_product-0.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 20.1 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
d8535a4b3d3f69b58212c7a2abce7730eaeb2934319496f58c1a992a4b925082
|
|
BLAKE2b-256 checksum How to use checksums |
711e1c5b12cb2f823e179abecd52653570f52515455b17382aaed1258b51417e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | wide_product-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.2 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
1a30c925b17e28c8b3376f108e8cd6a54dfe7f32c3b1e0efd7ad02475b2ef0c6
|
|
BLAKE2b-256 checksum How to use checksums |
0ead560d9af8448acadd1ada9e80d0367c9d5c21a9b84654bad1d1b9568914e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | wide_product-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 10.2 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
6c8ad3b4b8de73c4c2c9713cd97b5780c7fec3df8ebca3f0a933480ac674e6be
|
|
BLAKE2b-256 checksum How to use checksums |
951a4896a27609567b4d950ce09c7ca79f646a45dd63e007d53f3846e9b2a72e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp311-cp311-macosx_10_9_universal2.whl
| Download URL | wide_product-0.1.1-cp311-cp311-macosx_10_9_universal2.whl |
|---|---|
| Size | 16.4 kB |
| Tags | CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
58718d429e49be9002e3eb4d41153acf6f71ba39a3aa3b0b1c17101520105450
|
|
BLAKE2b-256 checksum How to use checksums |
af41a23af8aa54f3191a20faf102e89a1fd7bfe6a612262b35c6670f8b41cbad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | wide_product-0.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 20.1 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
76cdff06d6c306a2db33b080b88ea6fe637ad0e2af9eb955c81d8d43322d4871
|
|
BLAKE2b-256 checksum How to use checksums |
cfbab87ed84bcd0ae4e3b19ab9ad9de7836363f89de5b0d2d6fd3beae9fbd777
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | wide_product-0.1.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.2 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
c4535e4ca33ac5922d20db7b1c43a168827767578a4e573d2b453e0c3b2f0fe3
|
|
BLAKE2b-256 checksum How to use checksums |
5793c8033a39c9155dc173767f3edc1d8f11246a51f8cc6222f579737048bc67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | wide_product-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 10.2 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
8e1ba60d5cf5949ebe22904c39f96077ed0962a37df2c0f2feed685c551543e2
|
|
BLAKE2b-256 checksum How to use checksums |
42230fff2c9222f27754599a71cca0bc9ec925374722a06d3701ad4bc79fe0bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp310-cp310-macosx_10_9_universal2.whl
| Download URL | wide_product-0.1.1-cp310-cp310-macosx_10_9_universal2.whl |
|---|---|
| Size | 16.4 kB |
| Tags | CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
bad07807094dd7bb33ef7d7f0bf9c850207d6afaa47c215e15a1a7661bae7532
|
|
BLAKE2b-256 checksum How to use checksums |
8d258eb1797d67789dd3aa10016dda8d726add5928873287c4a32c3ceab5e3ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | wide_product-0.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 20.1 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
f57183459f21478a4472f12339e54d50da696aa315680e7b0518b0f89ed14d69
|
|
BLAKE2b-256 checksum How to use checksums |
e58c12310902ca06dfbdeec80bf76586dba4b5d1e0f5ac9df59dc7bc59531db5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | wide_product-0.1.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.2 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
335f9c864cfb07aaacbfcdbf425737f64beec96fe665a69fd86e8b30bccedc75
|
|
BLAKE2b-256 checksum How to use checksums |
9bde0507059164208ffa883f50366b214fcdd13af9b3b3240a965beccff1478d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | wide_product-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 10.2 kB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
504f615a49dc1180f6a706e09f12f6210300e23920e8d1d1a41c4e20495f76ab
|
|
BLAKE2b-256 checksum How to use checksums |
d5c032432c6866f595ff1588a128dd751835970ce74dbf39c51092e768cafca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp39-cp39-macosx_10_9_universal2.whl
| Download URL | wide_product-0.1.1-cp39-cp39-macosx_10_9_universal2.whl |
|---|---|
| Size | 16.4 kB |
| Tags | CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
b2b507f882d09b4dced03cfe11b4ba1d36828f2b83bed5c07416903244ed52bb
|
|
BLAKE2b-256 checksum How to use checksums |
856ac7fc5bb128b20f0c1add2d819cb6bd9198c7a57848bc08bf2127ed3268ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | wide_product-0.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 20.3 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
565f1da64a74969d30742eb3473c797631b79a9f15de1fc7ad165de453e888d1
|
|
BLAKE2b-256 checksum How to use checksums |
11da04b588cf0992a01c59164dca88c6e800f1fb6085b15954c47f7e54ab50f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | wide_product-0.1.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.3 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
2991cf3420689017f56a62217b77dc3c4a3ab1615408423e2c184bcde093b6e4
|
|
BLAKE2b-256 checksum How to use checksums |
a4a5f64a074a40d7c5ec99735535f2f7bab7da03806b97150979e43739905770
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl
| Download URL | wide_product-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl |
|---|---|
| Size | 10.2 kB |
| Tags | CPython 3.8 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
3da676353eabf1ebfd57c63dabcb8a657528d18d5b442b32f6ccb30a39d1e54c
|
|
BLAKE2b-256 checksum How to use checksums |
5622400151a689ca7412e405d85076b581995242debf968f984d3e322d3ee72b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp38-cp38-macosx_10_9_universal2.whl
| Download URL | wide_product-0.1.1-cp38-cp38-macosx_10_9_universal2.whl |
|---|---|
| Size | 16.4 kB |
| Tags | CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
d26741d4f57a4a2725546be86613047561da77424cf112877109fc424d3dd696
|
|
BLAKE2b-256 checksum How to use checksums |
7a6752a46160ee6cd356b433232abc2db77fe6051cd82ff9cd576bca32e6e9e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | wide_product-0.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 20.1 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
f60310cbd615a8df37ce1849532ee9edb061011ca52d19440a1552dd258dfaea
|
|
BLAKE2b-256 checksum How to use checksums |
b08e06e281b75c983835124476b98be7692150a20747dc5eaf581b956efb5105
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | wide_product-0.1.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.1 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
92b5d61af47dc1210caafc70f64a9f461adedc34a98eb44603b80e9a4e397952
|
|
BLAKE2b-256 checksum How to use checksums |
8ca6cc3fbd271d8e438eabadd16449b069f2d8c2393d2964c9a111d94dcd655c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / wide_product-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl
| Download URL | wide_product-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 10.1 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
36769acd24e2ddacde109a364e08ad3741169d5e2317e69fd820efb1fe728422
|
|
BLAKE2b-256 checksum How to use checksums |
bd852004eb378dfe57a2e78b9616560e535fc1a4f8ae6c913b21826d6232e134
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|