All Projects → AtsushiSakai → Numpycpp

AtsushiSakai / Numpycpp

Licence: mit
A c++ header library for matrix operation inspired Numpy Scipy, MATLAB only using Eigen.

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Numpycpp

numpyeigen
Fast zero-overhead bindings between NumPy and Eigen
Stars: ✭ 75 (+150%)
Mutual labels:  numpy, eigen, scipy
Pybind11 examples
Examples for the usage of "pybind11"
Stars: ✭ 280 (+833.33%)
Mutual labels:  numpy, eigen
eigenpy
Bindings between Numpy and Eigen using Boost.Python
Stars: ✭ 88 (+193.33%)
Mutual labels:  numpy, eigen
Workshopscipy
A workshop for scientific computing in Python. ( December 2017 )
Stars: ✭ 391 (+1203.33%)
Mutual labels:  numpy, scipy
sparse dot
Python wrapper for Intel Math Kernel Library (MKL) matrix multiplication
Stars: ✭ 38 (+26.67%)
Mutual labels:  numpy, scipy
jun
JUN - python pandas, plotly, seaborn support & dataframes manipulation over erlang
Stars: ✭ 21 (-30%)
Mutual labels:  numpy, scipy
Stats Maths With Python
General statistics, mathematical programming, and numerical/scientific computing scripts and notebooks in Python
Stars: ✭ 381 (+1170%)
Mutual labels:  numpy, scipy
polytope
Geometric operations on polytopes of any dimension
Stars: ✭ 51 (+70%)
Mutual labels:  numpy, scipy
Dsp Theory
Theory of digital signal processing (DSP): signals, filtration (IIR, FIR, CIC, MAF), transforms (FFT, DFT, Hilbert, Z-transform) etc.
Stars: ✭ 437 (+1356.67%)
Mutual labels:  numpy, scipy
Data Science Ipython Notebooks
Data science Python notebooks: Deep learning (TensorFlow, Theano, Caffe, Keras), scikit-learn, Kaggle, big data (Spark, Hadoop MapReduce, HDFS), matplotlib, pandas, NumPy, SciPy, Python essentials, AWS, and various command lines.
Stars: ✭ 22,048 (+73393.33%)
Mutual labels:  numpy, scipy
Cupy
NumPy & SciPy for GPU
Stars: ✭ 5,625 (+18650%)
Mutual labels:  numpy, scipy
Algorithmic-Trading
I have been deeply interested in algorithmic trading and systematic trading algorithms. This Repository contains the code of what I have learnt on the way. It starts form some basic simple statistics and will lead up to complex machine learning algorithms.
Stars: ✭ 47 (+56.67%)
Mutual labels:  numpy, scipy
Madmom
Python audio and music signal processing library
Stars: ✭ 728 (+2326.67%)
Mutual labels:  numpy, scipy
Python-Matematica
Explorando aspectos fundamentais da matemática com Python e Jupyter
Stars: ✭ 41 (+36.67%)
Mutual labels:  numpy, scipy
Scipy-Bordeaux-2017
Course taught at the University of Bordeaux in the academic year 2017 for PhD students.
Stars: ✭ 16 (-46.67%)
Mutual labels:  numpy, scipy
Docker Django
A complete docker package for deploying django which is easy to understand and deploy anywhere.
Stars: ✭ 378 (+1160%)
Mutual labels:  numpy, scipy
object-detection-with-deep-learning
demonstrating use of convolution neural networks to detect objects in a video
Stars: ✭ 17 (-43.33%)
Mutual labels:  numpy, scipy
SciCompforChemists
Scientific Computing for Chemists text for teaching basic computing skills to chemistry students using Python, Jupyter notebooks, and the SciPy stack. This text makes use of a variety of packages including NumPy, SciPy, matplotlib, pandas, seaborn, NMRglue, SymPy, scikit-image, and scikit-learn.
Stars: ✭ 65 (+116.67%)
Mutual labels:  numpy, scipy
Matchering
🎚️ Open Source Audio Matching and Mastering
Stars: ✭ 398 (+1226.67%)
Mutual labels:  numpy, scipy
Notes Python
中文 Python 笔记
Stars: ✭ 6,127 (+20323.33%)
Mutual labels:  numpy, scipy

numpycpp

Build Status

A c++ header library for matrix operation inspired Numpy, Scipy and MATLAB only using Eigen.

This library has some APIs which Numpy, Scipy, MATLAB has, but Eigen doesn't.

You can use it with only Eigen, and only include it.

Requrements

How to use

Just add a compile option to add the Eigen path, and include numpycpp.h in your code.

APIs

The test code: numpycppTest.cpp helps to understand APIs.

reshape

Gives a new shape to an array without changing its data.

This function is based on numpy.reshape

see: https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html

Eigen::MatrixXf x(6,1);
x<<1.0,2.0,3.0,4.0,5.0,6.0;
PRINT(x);

Eigen::MatrixXf rx = reshape(x,2,3);
PRINT(rx);
//rx:
//1 3 5
//2 4 6

Eigen::MatrixXf rx2 = reshape(x,3,2);
PRINT(rx2);
//rx2:
//1 4
//2 5
//3 6

isdiag

Detemine if matrix is diagonal

If matrix is not square, return false

It is inspired by MATLAB isdiag function.

see: https://www.mathworks.com/help/matlab/ref/isdiag.html

Eigen::MatrixXf x(3,1);
x<<5.0,6.0,7.0;
bool flag = isdiag(x);//return false

Eigen::MatrixXf x2(2,2);
x2<<5.0,6.0,7.0,1.0;
bool flag2 = isdiag(x2);//return false

Eigen::MatrixXf x3(3,3);
x3<<1.0,0.0,0.0,
    0.0,1.0,0.0,
    0.0,0.0,1.0;
bool flag3 = isdiag(x3);//return true

vstack

Stack matrix in sequence vertically

imspired by numpy.vstack

see :https://docs.scipy.org/doc/numpy/reference/generated/numpy.vstack.html

Eigen::MatrixXf x(3,1);
x<<5.0,
   6.0,
   7.0;

Eigen::MatrixXf y(3,1);
y<<1.0,
   10.0,
   100.0;

Eigen::MatrixXf a = vstack(x,y);
//ans<<5,
//     6,
//     7,
//     1,
//     10,
//     100;

hstack

Stack matrix in sequence horizontally

imspired by numpy.hstack

see: https://docs.scipy.org/doc/numpy/reference/generated/numpy.hstack.html

Eigen::MatrixXf x(3,1);
x<<5.0,
   6.0,
   7.0;

Eigen::MatrixXf y(3,1);
y<<1.0,
   10.0,
   100.0;

Eigen::MatrixXf a = hstack(x,y);
//a=
//5   1
//6  10
//7 100

kron

Compute the Kronecker product

A composite array made of blocks of the second array scaled by the first.

Inspired numpy.kron.

see: https://docs.scipy.org/doc/numpy/reference/generated/numpy.kron.html

Eigen::MatrixXf x(1,3);
x<<1.0,10.0,100.0;

Eigen::MatrixXf y(1,3);
y<<5.0,6.0,7.0;

Eigen::MatrixXf a = kron(x,y);
// a = [5 50 500  6 60 600  7  70 700]

block_diag

Create a block diagonal matrix from provided matrices

inspired scipy.linalg.block_diag

see: https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.linalg.block_diag.html

Eigen::MatrixXf x(3,1);
x<<5.0,
   6.0,
   7.0;

Eigen::MatrixXf y(1,3);
y<<1.0,10.0,100.0;

Eigen::MatrixXf a = block_diag(x,y);
//a=  5,  0,  0,  0,
//    6,  0,  0,  0,
//    7,  0,  0,  0,
//    0,  1, 10,100;

License

MIT

Author

Atsushi Sakai (@Atsushi_twi)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].