https://github.com/guillaume-chevalier/python-conv-lib
A lightweight library to do for-loop-styled convolution passes on your iterable objects (e.g.: on a list). Note: this is not a convolution, it is about exposing what would the kernel pass on in the first place in your loops.
https://github.com/guillaume-chevalier/python-conv-lib
convolution iterator library package python python-3 python3
Last synced: 2 months ago
JSON representation
A lightweight library to do for-loop-styled convolution passes on your iterable objects (e.g.: on a list). Note: this is not a convolution, it is about exposing what would the kernel pass on in the first place in your loops.
- Host: GitHub
- URL: https://github.com/guillaume-chevalier/python-conv-lib
- Owner: guillaume-chevalier
- License: mit
- Created: 2018-04-30T02:47:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-21T03:57:57.000Z (almost 6 years ago)
- Last Synced: 2025-06-09T08:38:30.317Z (4 months ago)
- Topics: convolution, iterator, library, package, python, python-3, python3
- Language: Python
- Homepage: https://pypi.org/project/conv/
- Size: 13.7 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING
- License: LICENSE
Awesome Lists containing this project
README
================
conv
================Description
=============Conv is a simple Python >= 3 package, lightweight library to do for-loop-styled convolution passes on your iterable objects (e.g.: on a list).
Installation
=============
::pip install conv
Example Usage
=============
::from conv import convolved
some_list = [1, 2, 3]
for kernel_hover in convolved(some_list, kernel_size=2, stride=1, padding=2, default_value=42):
print(kernel_hover)Result:
----------
::[42, 42]
[42, 1]
[1, 2]
[2, 3]
[3, 42]
[42, 42]Unit Tests:
-----------
::python setup.py test
A ``convolved_2d`` function also exists. See tests for more examples.
Notes
=============License: MIT
Author: Guillaume Chevalier