Skip to main content

3 functions for data transformation

Project description

Data Transformation Library

Description

The Data Transformation Library is a Python package designed for performing various matrix operations. This package includes functions for matrix transposition, sliding window generation on 1D arrays, and applying 2D convolution on matrices.

Installation

To install the Data Transformation Library, you will need Python 3.8 or later. The package can be installed via pip directly from PyPI:

pip install data_transformation_library

Usage

Here is how you can use the functions in the Data Transformation Library:

Transpose a 2D matrix

from data_transformation_library import transpose2d

matrix = [
    [1, 2],
    [3, 4]
]
transposed = transpose2d(matrix)
print(transposed)

Create a sliding window from a 1D array

from data_transformation_library import window1d
import numpy as np

input_array = np.array([1, 2, 3, 4, 5])
windows = window1d(input_array, size=2, shift=1, stride=1)
print(windows)

Apply a 2D convolution to a matrix

from data_transformation_library import convolution2d
import numpy as np

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

convol_result = convolution2d(input_matrix, kernel)
print(convol_result)

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

data_transform_lib_turing-1.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

data_transform_lib_turing-1.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file data_transform_lib_turing-1.1.tar.gz.

File metadata

  • Download URL: data_transform_lib_turing-1.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/21.6.0

File hashes

Hashes for data_transform_lib_turing-1.1.tar.gz
Algorithm Hash digest
SHA256 553e85cce9a828b6eb4d2a8021816d9a1687c273cd181ef59f8afadd83037f55
MD5 02c06a560bc5cfa6d99a9d7757b253a4
BLAKE2b-256 209494f6f7d9b74e8f4826e7f202c8691b417d443903ca754daae4afb27a9f5a

See more details on using hashes here.

File details

Details for the file data_transform_lib_turing-1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for data_transform_lib_turing-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af26e91007a243013db1a8c0832a76dc891af98796935432433ee5d9214b0f0c
MD5 c07add313eb2178a2edf6240eb55dedb
BLAKE2b-256 2673dfec49032ce83be42707598f033b1ee7b1b999100ce6d98c8f93aeea6052

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page