Using Python CFFI bindings for funtions to combine NumPy arrays in C++
Project description
combineArrays
This package provides Python CFFI bindings to combine NumPy arrays in C++ y_j = sum_i z(i*n+j)r(in+j), i=0,..,m, j = 0,..,n
Documentation
See doc/manual.pdf
Installation
To install type:
$ pip install combineArrays
Usage
### from combineArrays import replicate_arrays
replicate_arrays( a, y, length_a, n)
### Parameters
#### Input parameters:
a: array to be replicated, float
n: num replications, int64
#### Output parameters:
y: replicated array of length n_times * length_array, float
### from combineArrays import calc_distance
calc_distance( a_x_u, a_y_u, b_x, b_y, dist, num_u, num_b)
### Parameters
#### Input parameters:
a_x_u, a_y_u: arrays of length num_u, float
b_x, b_y: arrays of length num_b, float
#### Output parameters:
dist: array of size U*B of pairwise distances arranged as
[d_u1b1, d_u1b2, d_u2b1, d_u2b2, d_u3b1, d_u3b2], float
### from combineArrays import centroid_aux:
centroid_aux( a_demand, ov_allocation_u_b, a_coordinate_u, coo_b)
### Parameters
#### Input parameters:
demand: array of length num_u, float
allocation: array of length num_u * num_b, float
coordinate: array of length num_u, float
#### Output parameters:
coo_b : array of length num_b, float
Test
To unit test type:
$ test/test.py
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
combineArrays-0.7.tar.gz
(38.4 kB
view hashes)
Built Distribution
Close
Hashes for combineArrays-0.7-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 752c439228a3328343f3bc0267c20b9eda1064b410968e998b0a1d560db08dba |
|
MD5 | 0c98faf4eff98fc63e7a42c5811481e0 |
|
BLAKE2b-256 | 0d32a11c7836fac2cdb693400819da2a71037498b750749d0db0af8a31b1fdd5 |