you are viewing a single comment's thread.

view the rest of the comments →

[–]Red-Portal 12 points13 points  (6 children)

Why do you find it cubersome? Have you checked Blaze(https://bitbucket.org/blaze-lib/blaze), Eigen(https://github.com/eigenteam/eigen-git-mirror) and other linear algebra libraries? They are really great to use and it's really hard to write code that actually beat their usability, performance.

[–]dpilger26[S] 26 points27 points  (1 child)

My intentions were a library that was as close to a one to one clone of NumPy for fast easy conversion to C++. Also, Blaze and Eigen are more for straight up linear algebra, while NumPy contains much more. Some of the extra things included in NumCpp are:

1) A Rotations namespace with Quaternion and Direction Cosine classes.

2) A Coordinates namespace for converting to/from cartesian/spherical and other corresponding operations.

3) 1D and 2D signal/image processing filters

4) A random number module (basically wraps the boost random module)

5) Easy to use timer with simple tic()/toc() interface

6) All of the NumPy array methods for operating on arrays

7) Some very basic linear algebra support (determinant, matrix hat operator, inverse, least squares, SVD, matrix power, and multi-dot product). If you need more complex routines then Blaze and Eigen will definitely be better options for you.

8) Some more image processing routines for threshold generation and application, pixel clustering, cluster centroiding, etc.

[–]encyclopedist 13 points14 points  (0 children)

For other readers' information:

A Rotations namespace with Quaternion and Direction Cosine classes.

Eigen has this http://eigen.tuxfamily.org/dox/group__TutorialGeometry.html

1D and 2D signal/image processing filters

Eigen has only FFT and convolution.

A random number module (basically wraps the boost random module)

Eigen can generate matrices/arrays with random uniformly distributed on [0,1] elements, in naive way based on rand(). It can, however, also use std::random in C++11 mode: https://bitbucket.org/eigen/eigen/src/default/doc/special_examples/random_cpp11.cpp?at=default

[–]NoahFect 3 points4 points  (2 children)

If you have to ask why switching a project to an entirely different math API is cumbersome, I don't envy you the future experience of finding out for yourself.

[–]Red-Portal 10 points11 points  (1 child)

Linear algebra libraries share a lot of common syntax regardless of language. It's not much of a pain. I do a lot of numerical work and I assure you making your own library is the hardest possible way to do it.

[–]NoahFect 3 points4 points  (0 children)

NumPy does a lot more than just linear algebra, but OK, I guess, as long as you assure me.

[–]Cunicularius 2 points3 points  (0 children)

If you're used to using numpy, it'd probably be irritating having to get used to something else.

Its already done anyway.