Skip to content

rokas2019/Data_manipulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Manipulation

A package for common data manipulation operations in Python. Package is published on PyPI

Features

  • Transpose 2D Matrix: Transpose a given 2D matrix.
  • Generate 1D Windows: Create time series windows from a 1D array.
  • 2D Convolution: Perform 2D cross-correlation.

Installation

Prerequisites

Setting Up the Project

  1. Clone the repository:

    git clone https://github.com/rokas2019/Data_manipulation.git
    
  2. Install dependencies:

    poetry install
    
  3. Activate the virtual environment:

    poetry shell
    
    

Usage

from rokas_data_manipulation import transpose2d, window1d, convolution2d

# Example usage
matrix = [[1, 2, 3], [4, 5, 6]]
transposed = transpose2d(matrix)
print(transposed)

array = [1, 2, 3, 4, 5, 6, 7]
windows = window1d(array, size=2, shift=2, stride=2)
print(windows) 

input_matrix = np.array([
 [1, 2, 3],
 [4, 5, 6],
 [7, 8, 9]
 ])
kernel = np.array([
 [1, 0],
 [0, -1]
 ])
convolution = convolution2d(input_matrix, kernel, stride = 1)
print(convolution)

Testing:

poetry run pytest

About

A package for common data manipulation operations in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages